BETTER OR NOT
Problem Description
One criteria for evaluating 2 different colleges is based on the student strength.
Write a program to compare 2 colleges based on the student strength.
Input Format:
Input consists of 2 integers. The first integer corresponds to the number of students in college 1 and the second integer corresponds to the number of students in college 2.
Output Format:
Output consists of the string College 1 is better or College 2 is better.
Refer sample input and output for further formatting specifications.
Sample Input and Output:
[All text in bold corresponds to input and the rest corresponds to output]
CODING ARENA::
#include <stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
if(a>b)
{
printf("College 1 is better");
}
else
{
printf("College 2 is better");
}
return 0;
}
Test Case 1
Input (stdin)1000
2000
Expected Output
College 2 is better
Test Case 2
Input (stdin)2001
1999
Expected Output
College 1 is better
No comments:
Post a Comment