Search C Program | nimishsoft@gmail.com

Minimum value of Array

/* Minimum value of Array */
 
#include<stdio.h>

int main()
{
 int arr[10],i,min=0;
 printf("Please enter 10 values:\n");
 for(i=0;i<10;i++)
  scanf("%d",&arr[i]);
 
 min=arr[0];
 for(i=1;i<10;i++)
 {
  if(min>arr[i])
   min=arr[i];
 }
 
 printf("Minimum value of Array: %d",min);
 return 0;
}


Related Posts:
-------------------------------------------------------------
Maximum value of Array
http://cbasicprogram.blogspot.in/2012/05/maximum-value-of-array.html

No comments:

Post a Comment