Tuesday, 26 June 2018

C program to find minimum of element in array

/* Minimum of 5 element */
#include <stdio.h>
void main ()
{
int a[5] , i , min = 9999 ;
clrscr () ;
for ( i = 0 ; i < 5 ; i++ )
{
printf ("\n Enter a number:") ;
scanf ("%d", &a) ;
}
for ( i = 0 ; i < 5 ; i++ )
{
if ( min > a[i] )
min = a[i] ;
}
printf ("\n min = %d", min ) ;
getch () ;
}


1 comment:

Featured post

Program to find Volume of given box in java

class volume { public static void main (String args []) { int l=5,b=6,h=10; int volume; volume=l*b*h; System.out.println (" vol...