INDIA VS ENGLAND
Problem Description
Virat Kohli has won the toss against England in a 50 Over World Cup Final 2019. During the Toss time the commentator have him a funny task to test his mathematical skills.
Shastri was the umpire to judge his mathematical skills. When the number is 23 he needs tell "INDIA" and when the number is 50 he needs to tell "ENGLAND".
When the number is less than "0" he needs to tells as "Sorry". Help our cricket captain by writing a sample program.
Refer sample Input and Output:
Input 1: 204 Output: ENGLAND
Input 2: 219 Output: INDIA
Input 3: 2228 Output: ENGLAND
Input 4: -1 Output: Sorry
CODING ARENA
#include <stdio.h>
int main()
{
int a;
scanf("%d",&a);
if(a>0)
{
if(a%2==0)
printf("ENGLAND");
else if(a%2!=0)
printf("INDIA");
}
else
printf("Sorry");
return 0;
}
Test Case 1
Input (stdin)2056
Expected Output
ENGLAND
Test Case 2
Input (stdin)2907
Expected Output
INDIA
No comments:
Post a Comment