Skip to content

Commit b13f93c

Browse files
author
lanyuanxiaoyao
committed
修改文件: _posts/2014-09-17-a-b-input-out-seven.md
1 parent 8da9263 commit b13f93c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
layout: post
3+
title: 1095.A+B for Input-Output Practice (VII)
4+
date: 2014-09-17 17:44
5+
categories: 杭电HDU
6+
tags: [杭电HDU]
7+
---
8+
## Problem
9+
>**Problem Description**
10+
Your task is to Calculate a + b.
11+
**Input**
12+
The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
13+
**Output**
14+
For each pair of input integers a and b you should output the sum of a and b, and followed by a blank line.
15+
**Sample Input**
16+
1 5
17+
10 20
18+
**Sample Output**
19+
6
20+
21+
30
22+
23+
## Solution
24+
```cpp
25+
#include<stdio.h>
26+
int main()
27+
{
28+
int a,b;
29+
while(scanf("%d %d",&a,&b)!=EOF){
30+
printf("%d\n\n",a+b);
31+
}
32+
return 0;
33+
}
34+
```

0 commit comments

Comments
 (0)