11172-relational Operator
Time limit:3.000 seconds
Http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem &problem=2113
Some operators checks about the relationship between two values and these operators are, called Relational. Given two numerical values your job is just to find out the relationship between them this is (i), the one is greater tha n the second (ii) one is less than the second or (iii) the one and second one.
Input
The the input file is a integer t (t<15) which denotes how many sets of inputs are. Each of the next T lines contain two integers a and B (|a|,|b|<1000000001).
Output
For each line of the input produce one line of output. This line contains any one of the relational operators ">", "<" or "=", which indicates the relation Iate for the given two numbers.
Sample input Output for sample input
Complete code:
/*0.015s*/
#include <cstdio>
int main (void)
{
int T, a, B;
scanf ("%d", &t);
while (t--)
{
scanf ("%d%d", &a, &b);
Puts (a < b?) "<": (a = = b? "=": ">"));
}
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/sjjg/