Posts by HeiGames • 1 point
1 post
-
0
votes4
answers8769
viewsA: How to calculate the product of the elements of an array in C
int mmc = 1; for (int m = 0; m < divisor.Count; m++) { mmc = mmc *divisor[m]; } Start the variable with 1, so it will multiply by itself and next can multiply, if start with zero it will never be…