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 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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
