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 .
1
Expert's answer
2012-12-19T11:17:15-0500
#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; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment