3.2StudentScore学生成绩上机作业

这是一篇关于使用C++编程实现学生成绩管理的上机作业,主要针对21级学号为202130310257的学生。文章可能涵盖了程序流程设计和代码实现。
摘要由CSDN通过智能技术生成

 21级学号202130310257

#include<iostream>
#include<string>
using namespace std;
class StudentScore {
public:
	StudentScore()
	{
		student_nr = 2;
	}
	StudentScore(int student_count)
	{
		student_nr = student_count;
	}
	void InputStudentNameAndScore();
	void ShowStudentNameAndScore();
	void ShowStdentAvgScore(int student_id);
	void ShowCourseAvgScore(string course_name);
	void OrderScoreByCourse(string course_name);
private:
	float score_table[100][3];
	string name_array[100];
	int student_nr;
};
int main()
{
	StudentScore x;
	x.InputStudentNameAndScore();
	x.ShowStudentNameAndScore();
	x.ShowStdentAvgScore(1);
	x.ShowCourseAvgScore("A");
	x.OrderScoreByCourse("B");
	return 0;
}

	void StudentScore:: InputStudentNameAndScore() {
	
		for (int i = 0; i < student_nr; i++) {
			cout << "请输入学生姓名:" << endl;
			cin >> name_array[i];
			cout << "请输入科目A成绩:" << endl;
			ci
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值