100% Guaranteed Results


Java – Solved
$ 24.99
Category:

Description

5/5 – (1 vote)

Introduction to Programming
with Java

Class: AverageGrades.java
Score: (Medium)
Prerequisites: While Loops, If-Else Statements, ACM Task Force Commands

Description:
Write a program that asks for the midterm grades of students from the user until he/she enters a negative value then calculate the class average. Also print an error message if there is no entry (i.e. user gives negative value for the first entry).
(Note that grades of the students are integers)

Sample Run #1:
This program computes average of exam grades
Enter new grade (Negative value if finished): 50
Enter new grade (Negative value if finished): 80

Enter new grade (Negative value if finished): 40

Enter new grade (Negative value if finished): -1

Average Grade of the class is 56.666666666666664

Sample Run #2:
This program computes average of exam grades Enter new grade (Negative value if finished): -1
You have not entered any grade!

Reviews

There are no reviews yet.

Be the first to review “Java – Solved”

Your email address will not be published. Required fields are marked *

Related products