Find Minimum And Maximum Number In C


#include <stdio.h>

#include<conio.h>

void main(){

clrscr();

int i,arr[10],min=0,max=0;

printf("Enter Ten Number");

for(i=0;i<10;i++)

{

if(i==0)

{

main=max=arr[i];

}

else if(min>arr[i])

{

min=arr[i];

}

else if(max

{

max=arr[i];

}

}

printf("the minimum number is %d",min);

printf("the minimum number is %d",max);

getch();

}