Find the Greatest Between Four Number in c

 #include<stdio.h>

int main()

{

int num1, num2, num3, num4;

printf("Enter the numbers\n");

scanf("%d %d %d %d", &num1, &num2,&num3, &num4);

if((num1>num2) && (num1>num3) && (num1>num4))

printf("num1 is big %d",num1);

if((num2>num1) && (num2>num3) && (num2>num4))

printf("num2 is big %d",num2);

if((num3>num1) && (num3>num2) && (num3>num4))

printf("num3 is big %d",num3);

if((num4>num1) && (num4>num2) && (num4>num3))

printf("num4 is big %d",num4);

return 0;

}

Comments

Popular posts from this blog

create a num table in a new file in c

write a programme to compare time stamp in c

write a struct programme to keep bank details in c