学生成绩

#include<iostream.h>
typedef struct
{int id;
float math;
float  physics;
float computer;
float english;
float politics;
float sport;
float history;
float geography;
} STUDENT_SCORE;
void score(STUDENT_SCORE*);
int main()

 

{STUDENT_SCORE student_score;
cout<<"输入学生的编号:"<<endl;
cin>>student_score.id;

 

 student_score.math=90;
 student_score. physics=80;
 student_score. computer=70;

 

 student_score.english=60;
 student_score.politics=50;
 student_score.sport=30;
 student_score.geography=20;
score(&student_score);;
return 1;
}
void score(STUDENT_SCORE*p)
{
//输出学生的编号
cout<<"编号是:"<<p->id<<endl;
cout<<"数学是:"<<p->math<<endl;
cout<<"物理是:"<<p->physics<<endl;
cout<<"计算机是:"<<p->computer<<endl;
cout<<"英语是:"<<p->english<<endl;
cout<<"政治是:"<<p->politics<<endl;
cout<<"体育是:"<<p->sport<<endl;
cout<<"地理是:"<<p->geography<<endl;
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值