A C program to Find largest number from given numbers
#include<stdio.h>
#include<conio.h>
void main()
{
int lim,num,i,la;
clrscr();
printf("How many number you will type");
scanf("%d",&lim);
printf("Enter the numbers");
for(i=1,la=0;i<=lim;i++)
{
scanf("%d",&num);
if(num>la) {
la=num;
}
}
printf("The largest number among them is %d",la);
getch();
}
|