Created
January 26, 2020 21:39
-
-
Save psaruks/366a6ad306438dea20175ec17a273ad0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int zeroCount = 0; | |
double reiz = 1; | |
for (int x = 0; x < n; x++) { | |
if (arr[x] == 0) { | |
zeroCount++; | |
} | |
if (zeroCount == 2) { | |
break; | |
} | |
if (zeroCount == 1 && arr[x] != 0) { | |
reiz *= arr[x]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment