77 961
Assignments Done
Successfully Done
In August 2019

Answer to Question #20849 in C++ for Stephon

Question #20849
Write a program using while structure that allows you to enter 10 integer numbers and it prints out the largest of the numbers after completion of the entry.
Counter : Keeps the count of the entry
Number : Current number input into the program
Largest : The largest number found .
Expert's answer
#include <iostream>
#define Counter 10

using namespace std;

int main(int argc, const char * argv[])
int i=1,number,largest=0;

while (i<=Counter) {
& cin>>number;
& if (largest<number) {
largest = number;
& }
& ++i;
cout << largest;
return 0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions