Home > Back-end > Freshman year C language problem, consult!
Freshman year C language problem, consult!
Time:09-23
Excuse me what is the problem that this program, I want to enter a owns 10 number of arrays, and then there was a problem, how to solve this problem, #include # define NUMELS 10 Double business (int [], int); Int main () { Int grades [NUMELS]; int i; Double business; for(i=0; i{ Printf (" both please type in the number: \ n "); The scanf (" % d ", & amp; Grades [NUMELS]); } Business=average (grades, NUMELS); Printf (" % f ", business);
} Double business (int grades [], int NUMELS) { int i; Double total=0.0; for(i=0; i{ Total +=grades [I]; } Return (total/NUMELS); }
CodePudding user response:
for(i=0; i{ Printf (" both please type in the number: \ n "); The scanf (" % d ", & amp; Grades [I]); }