Write a Java program that stores the number 105.62 in a variable named firstnum, the number...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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\n The average is 97.88066666666667 \n 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\n The average is 97.88066666666667 \n
Expert Answer:
Answer rating: 100% (QA)
Solution for the above question is public class Main public static void mainString args ... View the full answer
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date:
Students also viewed these programming questions
-
Predictive text entry systems are familiar on touch screens and mobile phones. This question asks you to consider how the same principles might be used in a programming editor for creating Java code....
-
Let r and s be solutions to the quadratic equation x 2 b x + c = 0. For n N, define d0 = 0 d1 = r s dn = b dn1 c dn2 (n 2) Prove that dn = r n s n for all n N. [4 marks] (b) Recall that a commutative...
-
To eliminate service inconsistencies, companies rely on ___________ and ___________.
-
Below are some financial statement elements and their basis of measurement for a public company that follows IFRS. Complete the third column by noting whether the basis of measurement is a cost-based...
-
Find the linear charge density (in C/m) of the line charge of Problem 90.
-
Size of shaper is specified by: (a) The length of stroke (b) The size of the table (c) The maximum size of the tool (d) H.P. of motor
-
What type of bank serves your needs best? Visit the Web sites of the following institutions and prepare a chart comparing the services offered, such as traditional and online banking, investment...
-
Identify the two modes of tax classifications and their respective tax systems in most open economies? Discuss the economic implications of the above (5a) tax systems in developing economies
-
The Dean of Columbia College is looking for a tenured professor to teach in the Core Curriculum. Monetary incentives are needed to get someone interested, but how much? The Dean decides to use an...
-
In Exhibit 13-4, the makers of Healthy Hands Lotion discovered that the lotion can cause skin reactions, but it doesn't inform the buyers. While the market experiences imperfect information, the...
-
How do you post the closing entries to the T accounts provided below? Post the closing entries to the T accounts. If there is more than one closing entry for an account, enter in the order given in...
-
1. Determine the term "culture." Describe one analytical framework that may be used to measure and analyze the culture of a society. 2. Religion is an element of culture. How does the religion of...
-
One of the first marketing plans you will develop will be to market your personal brand. A personal brand is how you want to be seen. It will reflect your personality, your skills, and your...
-
I need step-by-step instructions on how to input this into QuickBooks Week Ending August 22, 2026 Melanie is ready for another great week. She has a big wreath workshop coming up that she is hoping...
-
Identify which control activity is violated in each of the following situations. Control Activity 1. Once a month, the sales department sends sales invoices to the accounting department to be...
-
Suppose the concentration of glucose inside a cell is 0.1 mm and the cell is suspended in a glucose solution of 0.01 mm. a. What would be the free energy change involved in transporting 10-o mole of...
-
Write a program to answer questions like the following: Suppose the species Klingon ox has a population of 100 and a growth rate of 15 percent, and it lives in an area of 1500 square miles. How long...
-
What does the Java code Scanner keyboard = new Scanner(System.in); keyboard.useDelimiter("y"); System.out.println("Enter a string."); String a = keyboard.next(); String b = keyboard.next();...
-
Create a program that tests the class Merlin described in the previous exercise. Use the toString method to verify that a unique instance has been created. Previous exercise. Sometimes we would like...
-
A diploid organism has a total of 14 chromosomes and about 20,000 genes per haploid genome. Approximately how many genes are in each linkage group?
-
By conducting testcrosses, researchers have found that the sweet pea plant has seven linkage groups. How many chromosomes would you expect to find in leaf cells of sweet pea plants?
-
Describe the unique features of ascomycetes that facilitate genetic analysis of these fungi.
Study smarter with the SolutionInn App