Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago