POJ 1000 A+B Problem

来源:互联网 发布:淘宝怎么看旺旺号 编辑:程序博客网 时间:2024/05/21 14:53

A+B Problem

Time Limit: 1000M

Description

Calculate a+b

Input

Two integer a,b (0<=a,b<=10)

Output

Output a+b

Sample Input

1 2

Sample Output

3

——————————————————————————————————

——————————————————————————————————

如题输入a,b两数,注意其取值范围;极其简单​,也没啥好说的了。代码如下

​#includeint main(){int a,b;while(scanf("%d%d",&a,&b)!=EOF && a>=0 && b<=10)// 连续输入。直至输入文件结尾。{printf("%d\n",a+b);//a+b的同时输出。}return 0;} 


 

0 0