#include<stdio.h>
#include<conio.h>
main()
{
int i,j,n,a[10],max;
clrscr();
max=0;
printf("\n Enter the elements:");
for(i=0;i<10;i++)
{
printf("\n Enter the elements a[%d]=",i);
scanf("%d",&a[i]);
}
for(i=0;i<10;i++)
if(a[i]>max)
{
max=a[i];
}
printf("\n %d",max);
getch();
}
No comments:
Post a Comment