Chef And Operators
Chef has just started Programming, he is in first year of Engineering. Chef is reading about Relational Operators.
Relational Operators are operators which check relatioship between two values. Given two numerical values A and B you need to help chef in finding the relationship between them that is,
Input
First line contains an integer T, which denotes the number of testcases. Each of the T lines contain two integers A and B.
Output
For each line of input produce one line of output. This line contains any one of the relational operators
'<' , '>' , '='.
Constraints
Example
Input: 3 10 20 20 10 10 10 Output: < > =
SOLUTION USING C LANGUAGE:-
#include <stdio.h>
int main(void) {
int T,i,A,B;
scanf("%d\n",&T);
for(i=0;i<T;i++)
{
scanf("%d %d\n",&A,&B);
if(A>B)
{
printf(">\n");
}
else if(A<B)
{
printf("<\n");
}
else
{
printf("=\n");
}
}
// your code goes here
return 0;
}
No comments:
Post a Comment