I need to write a program with C++ that will read 4 numbersthat was entered at t
ID: 3610978 • Letter: I
Question
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++; } coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.