Question: In Java CCoded in Java Users should be prompted to enter three numbers (three separate inputs). The datatype for the variables should be double. We
In Java
CCoded in Java
Users should be prompted to enter three numbers (three separate inputs). The datatype for the variables should be double. We want to find the average for the three numbers. You will need to create a variable for average. Average is equal to (number1 + number2 + number3)/3. The three numbers and the average should be printed. The output (as shown below), should have a title, proper spacing, and the output line should have all four numbers' output to two decimal places. Print each number input by the user and their average Enter number 1: 243.6654 Enter number 2: 567.3343 Enter number 3: 211.9987 The average of 243.67, 567.33 and 212.00 is 341.00 The user should be prompted to enter three numbers (three separate inputs). The datatype for the variables should be double. We want to find the average for the three numbers. You will need to create a variable for average. Average is equal to (number1 + number2 + number3)/3. Once done, the three numbers and the average should be printed. The output (as shown below), should have a title, proper spacing, and the output line should have all four numbers' output to two decimal places. Each line that appears in the program is happening by one of the following: System.out.print(), System.out.println(), or System.out.printf(), with the appropriate string to be printed in quotations. If a blank line is needed to create vertical spacing in the document (as I have done), simply use a System.out.println() with no String in quotations)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
