HOJ 1001 A+B

Time limit : 10 sec   Memory limit : 32 M


for each pair of integers A and B ( 0 <= A,B <= 10) , Output the result of A+B on a single line.

Sample Input

1 2
3 4
Sample Output
3
7

Solution:

#include <stdio.h>

int main()
{
    int a=0,b=0;
    while(scanf("%d %d",&a,&b) == 2)
    {
        printf("%d\n",a+b);
    }
    return 0;
}


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章