Skip to main content
Greatest Of N Number in C-Programming
#include <stdio.h>
int main()
{
int a[100],i,n;
printf("\nEnter the Limit :");
scanf("%d",&n);
printf("\nEnter the values :");
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n;i++)
{
if(a[0]<a[i])
{
a[0]=a[i];
}
}
printf("\nGreatest :%d",a[0]);
return 0;
}
Comments
Post a Comment