/*
Name: WAP to find the smallest of 10 numbers using for loop
Author: Parveen Malik
Date : 18/09/11 03:21
*/
#include<stdio.h>
#include<conio.h>
int main(void)
{
int a[15],min,i;
printf("Enter any ten numbers \n");
for(i=0;i<10;i++)
{
scanf("%d",&a[i]);
if(i==0)
min=a[i];
if( a[i]<min)
min=a[i];
}
printf("\nMinimum : %d",min);
getch();
return 0;
}
OUTPUT :
0 comments:
Post a Comment