#include<stdio.h>
#include<conio.h>
void main( )
{
int a[100],max,i,n;
clrscr( );
printf("Enter number of terms ");
scanf("%d",&n);
printf("Enter %d values ",n);
for(i=1;i<=n;i++)
{
scanf("%d",&a[i]);
}
max=a[1];
for(i=2;i<=n;i++)
{
if(max<a[i])
max=a[i];
}
printf("Highest number = %d",max);
getch( );
}
CODING |
OUTPUT |
For any query or suggestion please comment below....
No comments:
Post a Comment