English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2 answers

Sounds like the grades will be stored in an array. Find the average by running it through a for loop and then just adding all the scores up dividing by the number of students for the average. Then you run the array through another for loop and have an if statement nested in the for statement that counts the number of students that have less then the average, and then returns that. Pretty straight forward program, but it would be better if you code it yourself because you will never learn if I give you the code.

2006-10-29 02:40:20 · answer #1 · answered by Anonymous · 0 0

The user may not want to type all the 50 grades. Better save the grades in a txt file, and read the grades from the file.

2006-11-02 03:01:18 · answer #2 · answered by manoj Ransing 3 · 0 0

fedest.com, questions and answers