A+B for Input-Output Practice (III)

来源:互联网 发布:一口吃个胖子 知乎 编辑:程序博客网 时间:2024/05/18 00:42

A+B for Input-Output Practice (III)

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 88289    Accepted Submission(s): 46389


Problem Description
Your task is to Calculate a + b.
 

Input
Input contains multiple test cases. Each test case contains a pair of integers a and b, one pair of integers per line. A test case containing 0 0 terminates the input and this test case is not to be processed.
 

Output
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. 
 

Sample Input
1 510 200 0
 

Sample Output
630
 




附上代码

#include <stdio.h>#include <math.h>int main(){int a,b;    while(scanf("%d%d",&a,&b) != EOF)    {        if(a == 0 && b == 0)        break;        printf("%d\n",a + b);    }return 0;} 



0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 晚上吃多了胃疼怎么办 骨折打石膏后痒怎么办 脚脖子崴了肿了怎么办 喝酒喝的吐血了怎么办 感冒后咳嗽有痰怎么办 嗓子里老是有痰怎么办 物业把水停了怎么办 机洗衬衫缩水了怎么办 羊绒大衣洗缩水了怎么办 棉质衣服缩水了怎么办 衣服洗了变小了怎么办 毛衣洗后缩水了怎么办 鼻子又大又塌怎么办 苹果6被停用了怎么办 苹果6s手机停用怎么办 苹果4手机已停用怎么办 苹果手机5停用了怎么办 老公被骗300多万怎么办 苹果手机被抹除怎么办 钓鱼邮件点开了怎么办 幼犬吃多了拉稀怎么办 幼犬半夜醒了叫怎么办 相爱相杀的感情怎么办 冬天玩电脑手冷怎么办 被陌生人骗了钱怎么办 被网上骗了钱怎么办 20岁欠了10万怎么办 我赌博欠了10万怎么办 孩子见到生人不爱说话怎么办 18岁了个子矮小怎么办 1岁宝宝个子矮70怎么办 喋血街头2进监狱怎么办 360云盘收费了怎么办 头脑不清醒晕沉怎么办 一岁宝宝还不会走路怎么办 2岁宝宝受凉呕吐怎么办 3岁宝宝受凉呕吐怎么办 1岁宝宝受凉呕吐怎么办 3岁宝宝着凉呕吐怎么办 宝宝一进食就吐怎么办 宝宝吃什么都吐怎么办