c++work

这是一个C++程序,用于管理学生分数,包括输入学号和三门科目成绩,展示成绩,计算平均分以及按科目成绩进行升序排序。程序支持自定义学生人数,但在处理姓名输入时遇到问题,改为输入学号。通过迭代和数组操作实现了成绩排序功能。
摘要由CSDN通过智能技术生成

程序:

#include<iostream>
using namespace std;
class stuscore {
public:
stuscore()
{
times = 2;
cout << "coordinate construction1 called!" << endl;
}
stuscore(int times1)
{
times = times1;
}
~stuscore()
{
cout << "coordinate destruction called!" << endl;
}
void inputscore()
{
for (int i = 0; i < times; i++)
{
cout << "请输入学生序号:" << endl;
cin >> name[i];
cout << "请输入科目A成绩:" << endl;
cin >> score[i][0];
cout << "请输入科目B成绩:" << endl;
cin >> score[i][1];
cout << "请输入科目C成绩:" << endl;
cin >> score[i][2];
}
}
void showscore()
{
cout << "学号:" <&

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值