Write a Java program that will prompt the user for the grades for an exam, computes the
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a Java program that will prompt the user for the grades for an exam, computes the average, and returns the result. Your program must be able to handle an unspecified number of grades. (Hint: Tell the user to enter -1 when they finished entering grades). Be sure to test your code with a variety of values and number of grades.
2. Write a Java program that will repeatedly display a menu of choices to a user and prompt them to enter an option. You should use the following options:
- Say Hello - This should print "Hello" to console.
- Addition - This should prompt the user to enter 2 numbers and return the sum of the two.
- Multiplication - This should prompt the user to enter 2 numbers and return the product of the two.
- Exit - Leave the program
The program should continue to return to the menu until the user enters 4.
Posted Date: