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 operators. Given two numerical values your job is just to find out the relationship between them that is (i) First one is greater than the second (ii) First one is less than the second or (iii) First and second one is equal.
Input
First line of the input file is an integer t (t<15) which denotes how many sets of inputs are there. Each of the next t lines contain two integers a and b (|a|,|b|<1000000001).
Output
For each line of input produce one line of output. This line contains any one of the relational operators “>”, “<” or “=”, which indicates the relation that is appropriate for the given two numbers.
Sample Input Output for Sample Input
310 2020 1010 10 | < > = |
完整代码:
/*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 ? "=" : ">")); } }
查看本栏目更多精彩内容:http://www.bianceng.cnhttp://www.bianceng.cn/Programming/sjjg/
以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索operator
, relationship
, is
, The
, Operators
first
relational operator、11172 3、relational algebra、relational database、relational model,以便于您获取更多的相关知识。