Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i am struggling on this. it must loop in C++ End of the program 2: Largest and Smallest (required) The process of finding the largest

i am struggling on this. it must loop image text in transcribed
in C++
End of the program 2: Largest and Smallest (required) The process of finding the largest value (te, the maximum of a group of values) is used frequently in computer applications. Write a program that will read in five integers from the console and then calculate the average, find the largest and smallest integers, count the number of positive numbers and negative numbers. The sum of all entered numbers also should be printed out Your program should do the following things: I 1) Read 5 five integers (use loops) 2) Determine the number positive or negative (optional) 3) Count the numbers of positive numbers, and negative (optional) 4) Outputs the sum of all the numbers 5) Determine the largest and smallest number 6) Calculate the average of all the numbers 7) Display the results. The user enters the five numbers just once each and the user can enter them in any order. Your program should not ask the user to enter the positive numbers and the negative numbers separately. Example Output: Please enter integer: 36 76 11-27 There are 4 positive number and I negative numbers The largest is: 76 The smallesi -27 The sum of all number is 69 Would you like to do another of N) N Find program Required Test Cases 2.4, 7, 1,5 1432, 1767, 2143, 1242, 1234 98123, 45,-345, 65677,87341 66, 55, 66, 55, 66 121, 123, 123, 123, 123

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

Object Oriented Databases Prentice Hall International Series In Computer Science

Authors: John G. Hughes

1st Edition

0136298745, 978-0136298748

More Books

Students also viewed these Databases questions