answersLogoWhite

0


Best Answer

#include <stdio.h>

#include <conio.h>

int main()

{

int a,b,c,d;

printf("Enter any 4 numbers");

scanf("%d%d%d%d",&a,&b,&c,&d);

if(a>b&&a>c)

{

else if(a>d)

printf("%d is greatest",a);

}

if(b>a&&b>c)

{

else if(b>d){

printf("%d is greatest",b);

}

if(c>a&&c>b)

{

else if(c>d)

printf("%d is greatest",c);

}

else

{

printf("%d is greatest",d);

}

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Greatest of four numbers if else if?
Write your answer...
Submit
Still have questions?
magnify glass
imp