最省納智捷1年新車83萬起6檔好股票放一年賺5成攝影界美人正妹指定相機款台灣設計引領全球 雙鏡...
2012-01-12 19:44:33 人氣(43) | 回應(0) | 推薦(0) | 收藏(0) 上一篇 | 下一篇

[UVA] 11172 - Relational Operator

0
收藏
0
推薦

Problem H
Relational Operators
Input: Standard Input

Output: Standard Output

 

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

3
10 20
20 10
10 10

=

 





#include<stdio.h>
int main() {
    int T, x, y;
    scanf("%d", &T);
    while(T--) {
        scanf("%d %d", &x, &y);
        if(x < y)        puts("<");
        else if(x > y)    puts(">");
        else    puts("=");
    }
    return 0;
}

11172Relational Operator
台長:Morris
人氣(43) | 回應(0)| 推薦 (0)| 收藏 (0)| 轉寄
全站分類: 不分類 | 個人分類: UVA |
此分類下一篇:[UVA] 10327 - Flip Sort
此分類上一篇:[UVA] 11185 - Ternary

我要回應
是 (若未登入"個人新聞台帳號"則看不到回覆唷!)
* 請輸入識別碼:
請輸入以下數字 (ex:123)

(有*為必填)
詳全文