Large And Small Number

in Hindi - Large And Small Number



not yet

Source Code :

RUN#include <stdio.h>

int main ()
{
int num[5], i, j, max, min;

printf ("Please enter 5 numbers\n");
for (i = 0; i < 5; i++)
{
scanf ("%d", &num[i]);
}
max = num[0];
min = num[0];
for (i = 0; i < 5; i++)
{
if (num[i] < min)
{
min = num[i];
}
else if (num[i] > max)
{
max = num[i];
}
}
printf ("Small number = %d\n", min );
printf ("Large number = %d", max );

return 0;
}