#include<iostream.h>
struct student{
char name[2];
int score[4];
int average;
};
void main(){
student stu;
int sum=0;
int i;
cout<<"Enter the name:";
cin>>stu.name;
cout<<"Enter the scores:";
for(i=0;i<4;i++){
cin>>stu.score[i];
}
输完名字后按回车键程序直接结束,无法输入分数,是因为回车符号的影响吗?
相关分类