Code:
#include <stdio.h>
#include <conio.h>
void main()
{
int a[5],i,big,low;
clrscr();
printf("Enter 5 Number\n\n");
for(i=0;i<5;i++)
scanf("%d",&a[i]);
big=a[0];
for(i=0;i<5;i++)
{
if(a[i]>big)
big=a[i];
else
if(a[i]<low)
low=a[i];
}
printf("\nLargest Number is=%d\nSmallest Number is=%d ",big,low);
getch();
}
1 comments:
Thanks...
Post a Comment