UVa 11172 Relational Operator (water ver.)

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,以便于您获取更多的相关知识。

时间: 2024-11-02 20:04:44

UVa 11172 Relational Operator (water ver.)的相关文章

UVa 11727 Cost Cutting (water ver.)

11727 - Cost Cutting Time limit: 1.000 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=2827 Company XYZ have been badly hit by recession and is taking a lot of cost cutting

UVa 10300 Ecological Premium (water ver.)

10300 - Ecological PremiumTime limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=show_problem&problem=1241 German farmers are given a premium depending on the conditions at their far

UVa 488 Triangle Wave (water ver.)

488 - Triangle Wave Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=show_problem&problem=429 In this problem you are to generate a triangular wave form according to a specifie

UVa 10783 Odd Sum (water ver.)

10783 - Odd Sum Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=19&page=show_problem&problem=1724 Given a range [a, b], you are to find the summation of all the odd integers in this r

UVa 10079 Pizza Cutting (water ver.)

10079 - Pizza Cutting Time limit: 8.333 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=1020 When someone calls Ivan lazy, he claims that it is his intelligence that helps

UVa 11332 Summing Digits (water ver.)

11332 - Summing Digits Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=2307 For a positive integer n, let f(n) denote the sum of the digits of n when repr

UVa 12250 Language Detection (water ver.)

12250 - Language Detection Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=3402 English, Spanish, German, French, Italian and Russian are the 6 most promi

UVa 10252 Common Permutation (water ver.)

10252 - Common Permutation Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=1193 Given two strings of lowercase letters, a and b, print the longest string

UVa 371 Ackermann Functions (water ver.)

371 - Ackermann Functions Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=307 An Ackermann function has the characteristic that the length of the sequence