0
0
已采纳
#include <bits/stdc++.h>
#include<cstdlib>
#include<time.h>
using namespace std;
int x,ans;
int main()
{
srand(time(0));
for(int i=1;i<=20;i++)
{
if(cin>>x) ans+=x;
else ans+=rand()%20;
cout<<ans<<endl;
}
cout<<ans;
return 0;
}
你可以尝试改一下
0
0
0
0
0
0
0
0