/* C Program to find Smallest of N Number */
#include<stdio.h>
#include<conio.h>
main()
{
int a[30],n,k,i;
clrscr();
printf("\\Program to find smallest of N numbers\\ \n");
printf("Enter N value to get numbers:");
scanf("%d",&n);
printf("Enter the value to find the smallest of N:%d numbers \n",n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
k=a[0];
for(i=0;i<n;i++)
if(a[i]<=k)
k=a[i];
printf("The smallest of N:%d number is: %d",n,k);
getch();
}
OUT put
\Program to find smallest of N numbers\
Enter N value to get numbers:10
Enter the value to find the smallest of N:10 numbers
345
67
762
109
56
567
2
987
786
542
The smallest of N:10 number is: 2



