oj1089: A+B for Input-Output Practice (II)
来源:互联网 发布:sql批量修改字段值 编辑:程序博客网 时间:2024/04/30 17:20
问题描述:The first line integer means the number of input integer a and b. Your task is to Calculate a + b.
作者:何知令
发表时间:2017年2月16日
输入:Your task is to Calculate a + b. The first line integer means the numbers of pairs of input integers.
作者:何知令
发表时间:2017年2月16日
输入:Your task is to Calculate a + b. The first line integer means the numbers of pairs of input integers.
输出:For each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input.
代码:
/*问题描述:The first line integer means the number of input integer a and b. Your task is to Calculate a + b.作者:何知令发表时间:2017年2月16日输入:Your task is to Calculate a + b. The first line integer means the numbers of pairs of input integers.输出:For each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input.*/#include <stdio.h>#include <stdlib.h>int main(){ int num; int i; int a,b; scanf("%d",&num); for(i=0;i<num;i++) { scanf("%d %d",&a,&b); printf("%d\n",a+b); } return 0;}程序运行结果展示:
知识点总结:控制结构
学习心得:第二道依旧简单得要死
0 0
- oj1089: A+B for Input-Output Practice (II)
- 【杭电oj1089】A+B for Input-Output Practice (I)
- A+B for Input-Output Practice (II)
- A+B for Input-Output Practice (II)
- A+B for Input-Output Practice (II)
- A+B for Input-Output Practice (II)
- A+B for Input-Output Practice (II)
- A+B for Input-Output Practice (II)
- A+B for Input-Output Practice (II)
- A+B for Input-Output Practice (II)
- A+B for Input-Output Practice (II)
- A+B for Input-Output Practice (II)
- A+B for Input-Output Practice (II)
- A+B for Input-Output Practice (II)
- A+B for Input-Output Practice (II)
- A+B for Input-Output Practice (II)
- A+B for Input-Output Practice (II)
- 1090 A+B for Input-Output Practice (II)
- FragmentTabHost使用注意:tab居上居下,分割线,Fragment缓存
- VM安装三台linux虚拟机IP互通配置
- 数据加密
- java 数据结构
- 字符编码的变迁 ASCII, Unicode和UTF-8
- oj1089: A+B for Input-Output Practice (II)
- Java中的一些为什么
- RecycleView实现拖拽交换item位置
- 【好的做事习惯】六、团队合作
- phpadmin安装
- sockaddr_in详解
- C语言结构体与共用体(3)
- mysql qps tps一般多大
- java发送邮件工具类