#include<iostream>
#include<cstdio>
using namespace std;
int main(){
int a;
int sum = 0;
freopen("a.in", "r", stdin);
freopen("a.out", "w", stdout);
while(scanf("%d", &a) != EOF){
sum += a;
}
cout << sum;
fclose(stdin);
fclose(stdout);
return 0;
}
有哪位大佬解释一下,为什么这段代码读入数据后,没有输出答案到a.out中。