#include<stdio.h>
#include<conio.h>
int main()
{
int a[200];
int i,n,largest;
printf("enter no of elements:");
scanf("%d",&n);
for(i=0;i<n;i++)
{
printf("number [%d]",i+1);
scanf("%d",&a[i]);
}
largest=a[0];
for(i=0;i<n;i++)
{
if(largest<a[i])
largest=a[i];
}
printf("%d is the largest number. ",largest);
getch();
return 0;
}
2 Comments
thanks sushil
ReplyDeleteWelcome. Thanks for visiting.
Delete