how to print the min value from an array ?
i just understand the logic of printing max value, i tried so much to print the min but didn't find any clue...
here is the program for max value:
int main(void)
{
int num[5];
int i,max=0;
for (i=0;i<5;i++)
{
printf ("Enter value for %d:",i);
scanf ("%d",&num[i]);
if (num[i]>max)
max=num[i];
}
printf ("Maximum value is %d ",max);
getche ();
}