Question: Write a program that does the following: Reads an integer from the user that represents the number of the students in a class. Reads the
Write a program that does the following:
Reads an integer from the user that represents the number of the students in a class. Reads the scores of the students from the user and stores them in an array. Calculates and prints the average of the students with a passing grade (above or equal to 60).
Hints:
Assume that the scores of the students are integers between 0 and 100 (inclusive) Assume that there is at least one student in the class with a passing grade.
Sample run 1:
Enter the number of students in the class: 3
Enter the scores of 3 students: 90 80 40
The average of the students with a passing grade is 85.0
Sample run 2:
Enter the number of students in the class: 5
Enter the scores of 5 students: 90 80 40 60 70
The average of the students with a passing grade is 75.0
Write a program that does the following:
Reads an integer from the user that represents the number of the students in a class. Reads the scores of the students from the user and stores them in an array. Calculates and prints the average of the students with a passing grade (above or equal to 60).
Hints:
Assume that the scores of the students are integers between 0 and 100 (inclusive) Assume that there is at least one student in the class with a passing grade.
Sample run 1:
Enter the number of students in the class: 3
Enter the scores of 3 students: 90 80 40
The average of the students with a passing grade is 85.0
Sample run 2:
Enter the number of students in the class: 5
Enter the scores of 5 students: 90 80 40 60 70
The average of the students with a passing grade is 75.0
languge java
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
