#8008: 求助!


Sunday_15 (Sunday_15)


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

系统说我NA为什么?

c++

#8009: Re:求助!


asgenius061 (AshyRain_UE)


while(scanf("%d %d",&a,&b))
改為

while(scanf("%d %d",&a,&b)!=EOF)

再試試看