please see photo below Develop a program that uses a loop to find the largest nu
ID: 3540009 • Letter: P
Question
please see photo below
Explanation / Answer
#include <iostream>
using namespace std;
int main()
{
int a;
int b=0;//initial statement
int c;
int i;//condition
cout<<"How many numbers you want to compare ";
cin>>c;
cout<<"Enter the numbers ";
for(i=0;i<c;i++)//loop statement and i++ update statement
{
cin>>a;
while(a>b)
{
b=a;
}
}
cout<<"Greatest number="<<b<<endl;
}