A+B 输入输出练习III Posted on 2020-11-26 Edited on 2021-04-14 In 算法笔记 Views: 题目描述:你的任务是计算a+b。 输入格式:输入中每行是一对a和b。其中会有一对是0和0标志着输入结束,且这一对不要计算。 输出格式:对于输入的每对a和b,你需要在相应的行输出a、b的和。如第二对a和b,他们的和也输出在第二行。 输入样例:1 510 200 0 输出样例:630 train of thought: code: 123456789include<cstdio> int main(){ int a, b; while (scanf("%d %d", &a, &b), a || b) { printf("%d\n", a + b); }; return 0;} Post author: SRP05 Post link: https://srp05.github.io/2020/11/26/A-B-输入输出练习III/ Copyright Notice: All articles in this blog are licensed under BY-NC-SA unless stating additionally.