Question: Write a Java program that computes the sum and the average of any three decimal numbers provided by the user. The program asks the user
Write a Java program that computes the sum and the average of any three decimal numbers provided by the user.
The program asks the user to input three decimal numbers one at a time. It will compute the sum and the average of the three numbers. Then it will display the three numbers, their sum and the average in a single output dialog box. See Test section below.
-----------------------------------------
Test Run
Enter the first number:
2.5
Enter the second number:
3.3
Enter the third number:
4.4
The sum of 2.5, 3.3 and 4.4 is 10.2
The average of 2.5, 3.3 and 4.4 is 3.4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
