哪位大侠帮我改下这C++程序啊??

来源:百度知道 编辑:UC知道 时间:2024/09/24 04:05:09
#include <iostream>
#include <string>
using namespace std;

int main()
{

struct student {
/*string name;*/
int id;
int Chinese;
int English;
int maths;
int sport;
};
string stu [5] = {"SUN","IBM","MS","APPLE","GOOGLE"};for(int i=0;i<5;i++)
{
cout << "请你输入" << stu [i] <<"的学号:";
cin >> stu [i] .id;

cout << "请你输入" << stu [i] <<"的语文成绩:";
cin >> stu [i].Chinese;
cout << "请你输入" << stu [i] <<"的英语成绩:";
cin >> stu [i].English;
cout << "请你输入" << stu [i] <&l

#include <iostream>
using namespace std;
int main()
{
struct student {
/*string name;*/
int id;
int Chinese;
int English;
int maths;
int sport;
};
struct student stu[5];
char name[][7]={"SUN","IBM","MS","APPLE","GOOGLE"};
for(int i=0;i<5;i++)
{
cout << "请你输入"<<name[i]<<"的学号"<<endl;
cin >> stu[i].id;

cout << "请你输入"<<name[i]<<"的汉语成绩" <<endl;
cin >> stu[i].Chinese;
cout << "请你输入"<<name[i]<<"的英语成绩"<<endl;
cin >> stu[i].English;
cout << "请你输入"<<name[i]<<"的数学成绩"<<endl;
cin >> stu[i].maths;
cout << "请你输入"<<name[i]<<"的体育成绩" <<endl;
cin >>