C语言实验——两个数比较
2017-11-17 11:41
239 查看
C语言实验——两个数比较
Time Limit: 1000MS Memory Limit: 65536KB
Submit Statistic
Problem Description
求2个数中较大者。
Input
第一行为测试的数据组数N,接下来的N行分别是两个待比较的整数。
Output
输出N行,每一行的值为每组数中较大的整数。
Example Input
2
1 2
15 10
Example Output
2
15
Hint
Author
Time Limit: 1000MS Memory Limit: 65536KB
Submit Statistic
Problem Description
求2个数中较大者。
Input
第一行为测试的数据组数N,接下来的N行分别是两个待比较的整数。
Output
输出N行,每一行的值为每组数中较大的整数。
Example Input
2
1 2
15 10
Example Output
2
15
Hint
Author
#include <stdio.h> #include <stdlib.h> #include <math.h> int main() { int t,a,b; scanf("%d",&t); while(t--) { scanf("%d %d",&a,&b); if(a > b)printf("%d\n",a); else printf("%d\n",b); } return 0; }
相关文章推荐
- C语言实验——两个数比较
- C语言实验——两个数比较
- oj1982: C语言实验——两个数比较
- (TOJ1002)C语言实验题——两个数比较
- C语言实验——两个数比较
- C语言实验——两个数比较
- C语言基础篇(2):按位比较是否相等、找出不是成对出现的单数、不用中间变量实现两个数的交换
- C语言实验——保留字母
- 基于“国共合作”本体的语义相关度量方法比较实验计划
- C语言实验——计算1到n的和(循环结构)
- 王爽汇编语言第六章学习笔记和实验五答案
- BZOJ4013: [HNOI2015]实验比较
- C语言实验——求两个整数之和
- C语言实验——输入数字星期,输出英文(switch语句)
- 汇编语言(王爽 第三版)实验十三
- bzoj4013[HNOI2015]实验比较
- Node.js的Express模板语言简单比较
- oj 2002: C语言实验——单词统计
- 请定义一个宏,比较两个数的a、b的大小,不能使用大于、小于、if语句
- java Scanner的小用法比较两个数大小