#include<iostream>
using namespace std;
void main()
{
int x[] = {4,2,8,9,3,12,5,0,14,1};
int count = 0, largest = 0;
while (count !=10)
{
if(x[count]>largest)
largest = x[count];
count=count+1;
}
cout<<"\n The largest number is "<<largest;
system("pause");
return 0;
}
return 0 with void
does this look correct to you?
Last edited on