C C++ Programming with Kailash Chandrasekar
Let your simple dreams come true in programming...
Sunday, March 21, 2010
A PROGRAM TO FIND THE BIGGER NUMBER OF THE GIVEN SERIES
void main()
{
int i,n,a[150],max;
clrscr();
cout<<"ENTER THE LIMIT : ";
cin>>n;
cout<<"ENTER THE ELEMENTS : ";
for(i=1;i<=n;i++)
{
cin>>a[i];
}
max = a[1];
for(i=1;i<=n;i++)
{
if(a[i]>max)
{
max = a[i];
}
}
cout<<"\nTHE BIGGEST NUMBER IS : "<
<
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment