C++写出下面程序的输出结果 谢谢

#include<iostream.h>
void main()
{
struct Student{
char name[10];
int mathscore[2];
}student[3]={
{“潘特”,88,89},{“林达”,90,86},{“金火”,76,80}
};
int i;
for(i=0;i<2;i++)
{
if((student[i].mathscore[0]>=85)&&(student[i].matnscore[1]>=85))
{
cout<<student[i].name<<” ”<< student[i]. mathscore[0]<<” “<<
student[i]. mathscore[1]<<endl;
}
}}

//改正程序
void main()
{
struct Student{
char name[10];
int mathscore[2];
}student[3]={
{"潘特",88,89},{"林达",90,86},{"金火",76,80} //有中文符号!
};
int i;
for(i=0;i<2;i++)
{
if((student[i].mathscore[0]>=85)&&(student[i].mathscore[1]>=85)) //mathscore写错了!
{
cout<<student[i].name<<" "<< student[i]. mathscore[0]<<" "<<
student[i]. mathscore[1]<<endl;
}
}}

//运行结果如下:
潘特 88 89
林达 90 86
温馨提示:答案为网友推荐,仅供参考
相似回答