CppBuzz.com
  
Home C C++ Java Python Perl PHP SQL Javascript Linux Forum

C program to Display minimum number from given array

You are here : Home » Solved Programs in C » C program to find minimum number from given array

#include<stdio.h>

int main()
{
int no[5]; 
int min;
int i;

for(i=0;i<5;i++)
{
printf("\n Enter any no :");
scanf("%d", &no[i]);
}

min = no[0];

for(i = 1;i<5;i++)
{
if(no[i]<min)
min=no[i];
}

printf("\n Min no is : %d", min);
return 0;
}