李子京,冷枭你好毒,陈维力
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"。
作者 任琦磊
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
如何在没有core文件的情况下用dmesg+addr2line定位段错误
用QT制作3D点云显示器——QtDataVisualization
网友评论