Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Correct the wrong question: enter the scores of three students (plastic surgery) and find the total score and average score of these three students.
Correct the wrong question: enter the scores of three students (plastic surgery) and find the total score and average score of these three students.
aver = sum/3; Changed to aver = (flaot) sum/3; Only in this way can we get floating-point results.

fprintf(wf," %d\n%f\n ",x); To fprintf(wf," %d\n%f\n ",sum,aver);