C programming code to find minimum value of an array

Share This Topic:
  •  
  •  
  •  
  •  
  •  

Course Details

Field of Study: Computer Science and Engineering
Course Name: C Programming
Course Description: C programming code to find minimum value of an array

Code
#include<stdio.h>
#include<conio.h>

void main()
{
clrscr();
int x[6]={70,29,3,8,30,76};
int min=x[0];
for(int i=0;i<6;i++)
{
if(x[i] < min)
min=x[i];
}
printf(“Minimum value is %d”,min);
getch();
}

Add a Comment

Your email address will not be published. Required fields are marked *