Try Magic Notes and save time.Try it free
Try Magic Notes and save timeCrush your year with the magic of personalized studying.Try it free
Question

Arithmetic, Largest Value and Smallest Value) Write a program that inputs three different integers from the keyboard, then prints the sum, the average, the product, the smallest and the largest of these numbers. Use only the single-selection form of the if statement you learned in this chapter. The screen dialogue should appear as follows:

Enter three different integers: 13 27 14
Sum is 54
Average is 18
Product is 4914
Smallest is 13
Largest is 27

Solution

Verified
Answered 1 year ago
Answered 1 year ago
Step 1
1 of 6

In this task, we'll write a program that uses the scanf() function to get three integer values from the user and prints their sum, the average, the product, the smallest and the largest number.

We'll only use the if statement for finding the smallest and the largest number.

Create an account to view solutions

Create an account to view solutions

Recommended textbook solutions

Computer Organization and Design MIPS Edition: The Hardware/Software Interface 5th Edition by David A. Patterson, John L. Hennessy

Computer Organization and Design MIPS Edition: The Hardware/Software Interface

5th EditionISBN: 9780124077263David A. Patterson, John L. Hennessy
226 solutions
C: How to Program 7th Edition by Harvey M. Deitel, Paul J. Deitel

C: How to Program

7th EditionISBN: 9780132990448 (3 more)Harvey M. Deitel, Paul J. Deitel
448 solutions
Fundamentals of Database Systems 7th Edition by Ramez Elmasri, Shamkant B. Navathe

Fundamentals of Database Systems

7th EditionISBN: 9780133970777Ramez Elmasri, Shamkant B. Navathe
895 solutions
Introduction to Algorithms 3rd Edition by Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen

Introduction to Algorithms

3rd EditionISBN: 9780262033848 (5 more)Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen
849 solutions

More related questions

1/4

1/7