Question: Write a Java program that stores the number 105.62 in a variable named firstnum, the number 89.352 in a variable secondnum, and the number
Write a Java program that stores the number 105.62 in a variable named firstnum, the number 89.352 in a variable secondnum, and the number 98.67 in a variable thirdnum. (Be sure to declare the variables of a type that will not result in a loss of data precision). Have your program calculate the total of the three numbers and their average. The total should be stored in a variable named total and the average in a variable named average. (Use the statement average = total / 3.0; to calculate the average). Display the total and average on the screen as shown below (use variables do not type in the numbers!!): The total is 293.642. The average is 97.88066666666667. PSEUDOCODE IS REQUIRED FOR THIS PROGRAM. It is worth 2 points and should be put in comments at the top of your program under your name and assignment information. Test Case 1 The total is 293.642 The average is 97.88066666666667
Step by Step Solution
There are 3 Steps involved in it
Solution for the above question is public class Main public static void mainString args ... View full answer
Get step-by-step solutions from verified subject matter experts
