杭电oj id1000
ps:注意process to end of file

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

错误原因:没看懂eof的意思
EOF的意义及用法(while(scanf("%d",&n) != EOF)):
https://me.csdn.net/henu1710252658

相关文章: