Patrick and Johnny are now in the third level of "Collect Flags" game. This level contains three different paths.        
They can go through only one path at a time. Their task is to collect the maximum number of flags. They got a clue that the path number with maximum value will contain maximum flags. Help them to select the path with maximum value.

Input Format:
Input consists of 3 lines. Each line consists of an integer representing the path number.
Output Format:
Output consists of a single line. Refer sample output for the format.

Sample Input :
3
5
1
Sample Output :
5 is the maximum number

Program Code:
#include<stdio.h>
int main()
{
    int a,b,c,l;
    scanf("%d%d%d", &a,&b,&c);
    l=a>b?(a>c?a:c):(b>c?b:c);
    printf("%d is the maximum number",l);
    return 0;
}
Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..

Post A Comment:

0 comments: