Description:
Input:
Output:
Sample Input:
1 2
Sample Output:
3 看起來很容易的對不對?但是真的沒有想到竟然過不了~ 原因如下: 1.sample中“1 2”之間是空格! 2.看了別人的答案才知道要判斷輸入的數據是否到了結尾!
#include<stdio.h>
using namespace std;
int main()
{
int a,b;
while(scanf("%d %d",a,b)!=EOF)
{
printf("%d",a+b);
}
return 0;
}
深感不足~2015.3.8
>