Question: Q1: Write an application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers. [Note: The

 Q1: Write an application that inputs three integers from the user

Q1: Write an application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers. [Note: The calculation of the average in this exercise should result in an integer representation of the average. So if the sum of the values is 7, the average should be 2, not 2.3333....) Problem Solving Tips: Prompt the user for three integer values and use Scanner method nextInt to read them into their respective int variables. Use a series of if statements to determine the smallest and largest numbers. You must use relational operators in the if conditions to compare two numbers at a time. Calculate the sum, product and average, and assign them to variables called sum, product and average, respectively. Then, display the results. Test your program thoroughly using different test inputs and determine whether your program produces the correct results (I need two different outputs) Sample Output: 25 Tasks Console x Search Q3 (Java Application] C:\Program Files (x86)\ava\jr Enter first integer: Enter second integer: 34 Enter third integer: 15 For the numbers 25, 34 and 15 Largest is 34 Smallest is 15 Sum is 74 Product is 12750 Average is 24

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!