Question: In C++ Using a while loop, get number from the keyboard until the first number entered is repeated. In other words, use the first number
In C++
Using a while loop, get number from the keyboard until the first number entered is repeated. In other words, use the first number as the sentinel for the loop.
Output the largest number entered.
Do not count the sentinel as one of the numbers!
Example:
Input a number
10
Input a number
5
Input a number
9
Input a number
4
Input a number
3
Input a number 10
The largest number entered was 9
Make sure you prime the loop properly.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
