A simple Java console application that calculates the sum and average of user-entered grades.
- Takes input of multiple grades from the user
- Calculates the total sum
- Computes the average with decimal precision
- Supports dynamic input size
- Prompts the user to enter how many grades they want to input.
- Accepts each grade through user input.
- Calculates the sum and average.
- Displays the result to the user.
- Java 8 or later
- A terminal or IDE like IntelliJ, Eclipse, or VS Code
- Compile the program:
javac AverageCalculator.java
- Run the prpgram:
java AverageCalculator
How many grades do you want to enter? 3 Enter grade #1: 85 Enter grade #2: 90 Enter grade #3: 88 Sum: 263 Average: 87.67
Mohammad Abdullah Computer Science Major β Software Engineering Track Adelphi University