I need to write a program with C++ that will read 4 numbersthat was entered at the keyboard and will print the largestone. The program has to work for any numbers entered,including negative numbers. Hint: As each number isread, check to see if it is the largest number so far. I have to use the 'while loop'. Please Help....... Thank you, Will rate. I need to write a program with C++ that will read 4 numbersthat was entered at the keyboard and will print the largestone. The program has to work for any numbers entered,including negative numbers. Hint: As each number isread, check to see if it is the largest number so far. I have to use the 'while loop'. Please Help....... Thank you, Will rate.
Explanation / Answer
first you take the first input as the largest input then prompt foranother number #include using namespace std; int main() { int largest=0; int entered=0; int count=1; cout > entered; largest = entered; while(count > entered; if(entered > largest) { largest =entered; } count++; } cout