Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <dataType> multiplication(int n, dataType* array){
- dataType res = 1;
- for (int i = 0; i < n; i++) {
- if (array[i] != 0)
- res *= array[i];
- }
- return res;
- }
- dataType = int | float | double
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement