Since the OP found the problem but didn't explain what happened for readers of this thread, allow me:
The %d specifier expects an integer value, yet an unadorned total is equivalent to &total. Thus the argument tied to %d is a pointer to int rather than an int, and the compiler is warning that it's probably not what the programmer wanted.
The total array was also not initialized, so trying to print any of it's elements is undefined behavior. Perhaps the OP wanted scanf() instead of printf(), but that's not a safe bet due to the use of fflush(stdout).
All in all, I'm not sure what the purpose of this function is, and that information is necessary to truly fix the problems.
Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...