2 u014025487 u014025487 于 2014.03.10 18:58 提问

求帮助!为什么会是output limit exceed ( 谢谢了)

#include
#include
using namespace std;
struct student
{
int number;
string name;
int score[3];
};
int main()
{
const int n=5;
student stu[n];
void input(student [],int );
void print(student [],int );
input(stu,n);
print(stu,n);
return 0;
}
void input(student s[],int n)
{int i;
for(i=0;i {cin>>s[i].number>>s[i].name;
for(i=0;i cin>>s[i].score[i];
cout<<endl;}
}
void print(student a[],int n)
{
int j;
for(j=0;j<n;j++)
{
cout<<a[j].number<<" "<<a[j].name<<" "<<endl;
for(j=0;j<3;j++)
cout<<a[j].score[j]<<" ";
cout<<endl;
}
}

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!