my code here work fine. but it seem a bit long for me. what the best way to find the biggest or smallest number if the numbers is more than 10 number?please help me. appreciate for all reply. thanks . here is the code :
Code:
#include<stdio.h>
main()
{
int a,b,c,d;
printf("Input four numbers to get the biggest number:\n");
scanf("%d%d%d%d",&a,&b,&c,&d);
if(a>b&&a>c&&a>d)
printf("the biggest number is %d",a);
if(b>a&&b>c&&b>d)
printf("the biggest number is %d",b);
if(c>a&&c>b&&c>d)
printf("the biggest number is %d",c);
if(d>a&&d>b&&d>c)
printf("the biggest number is %d",d);
}