C Program To Find The Largest Of N Numbers

#include<stdio.h>
#include<conio.h>
void main()
{
int n,a,i,l=0;
clrscr();
printf(" How many numbers u have: ");
scanf("%d",&n);
printf("Enter the numbers:\n");
for(i=1;i<=n;i++)
{
scanf("%d",&a);
if(a>l)
l=a;
}
printf("%d",l);


getch();
}
Bhanu Namikaze

Bhanu Namikaze is an Ethical Hacker, Security Analyst, Blogger, Web Developer and a Mechanical Engineer. He Enjoys writing articles, Blogging, Debugging Errors and Capture the Flags. Enjoy Learning; There is Nothing Like Absolute Defeat - Try and try until you Succeed.

No comments:

Post a Comment