Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C++ Write a program that will accept n number of integers from the keyboard. When the loop exits output the largest and smallest value
In C++
Write a program that will accept n number of integers from the keyboard. When the loop exits output the largest and smallest value entered. Note Be careful, it is not appropriate to initialize the variables that hold the largest and smallest values to 0 as your first number. If you think about it if all values entered are greater than 0 then your program will output 0 as the smallest number and this was not a number that was entered Required: The only decisions staments allowed inside the loop are to determine the largest and smallest value. This means you are not allowed to use a decision to determine if the first number was entered. This is going to require you to prime your loop. We cover priming the loop in the next section but for this assignment it means get the first number before the loop begins. We will also assume that at least one number is going to be input
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started