#include<stdio.h>
#include<conio.h>
#include<windows.h>
int main()
{
int l[100],i,n,min;
printf("\nEnter any number=");
scanf("%d",&n);
printf("\nEnter array element\n");
for(i=0;i<n;i++)
{
scanf("%d",&l[i]);
}
min=l[0];
for(i=1;i<n;i++)
{
if(min>l[i])
{
min=l[i];
}
}
printf("\nSmallest number =%d",min);
getch();
}
for output of this program click on the link given below
No comments:
Post a Comment