HDUacm 1000 A + B Problem
程序员文章站
2022-06-07 20:34:58
problem description
calculate a + b.
input
each l...
problem description
calculate a + b.
input
each line will contain two integers a and b. process to end of file.
output
for each case, output a + b in one line.
sample input
1 1
sample output
2
code:
1 #include <stdio.h>
2 main()
3 {
4 int a,b;
5
6 while(scanf("%d%d",&a,&b)!=eof)
7 {
8 printf("%d\n",a+b);
9 }
10 }
tips:
process to end of file. //使用while循环,终止于eof。
output a + b in one line. //printf需输出"/n"。
作者 任琦磊
上一篇: RedHatLinux AS3中配置sendmail服务器
下一篇: 在C中如何使函数返回数组
推荐阅读
-
HDUacm 1000 A + B Problem
-
洛谷P1919 【模板】A*B Problem升级版(FFT快速傅里叶)
-
[Algorithm] 1. A+B Problem
-
水果B2B平台“果联科技”获得1000万元融资
-
bzoj2301【HAOI2011】Problem b
-
AGC015 D A or...or B Problem(智商题)
-
(string高精度)A + B Problem II hdu1002
-
牛客多校第三场 A-Clam and Fish【贪心】+ B-Classical String Problem【思维】
-
A + B Problem II
-
POJ_Prob.ID:1000 A+B Problem