網(wǎng)站首頁 編程語言 正文
本文實例為大家分享了C++實現(xiàn)簡單班級成績管理系統(tǒng)的具體代碼,供大家參考,具體內(nèi)容如下
#include#include #include #include #include using namespace std; int n=0; class Student {public: ? ?? ?string name; ? ? string num; ? ? char cclass[20]; ? ? int lisan; ? ? int gaoshu; ? ? int dianlu; ? ? int sum; ? ? /*--------------------------輸入函數(shù)-----------------------------*/ ? ? void input() ? ? { ? ? ? ? cout<<"\t請輸入姓名:"; ? ? ? cin>>name; ? ? ? ? cout<<"\t請輸入學(xué)號:"; ? ? ? cin>>num; ? ? ? ? cout<<"\t請輸入班級:"; ? ? ? cin>>cclass; ? ? ? ? cout<<"\t請輸入離散成績:"; ? cin>>lisan; ? ? ? ? cout<<"\t請輸入高數(shù)成績:"; ? cin>>gaoshu; ? ? ? ? cout<<"\t請輸入電路成績:"; ? cin>>dianlu; ? ? ? ? sum=lisan+gaoshu+dianlu; ? ? } ? ? /*------------------------------show函數(shù)------------------------*/ ? ? void show() ? ? { ? ? ? ? cout<<"姓名:"< >a; ? ? switch(a) ? ? { ? ? case 1:{ ? ? ? ? cout<<"請輸入需查找學(xué)生的學(xué)號:"; ? ? ? ? cin>>bp; ? ? ? ? z=snum(bp); ? ? ? ? if(z!=-1) ? ? ? ? stu[z].show(); ? ? ? ? else ? ? ? ? cout<<"沒有找到該學(xué)生"< >ap; ? ? ? ? z=sname(ap); ? ? ? ? if(z!=-1) ? ? ? ? stu[z].show(); ? ? ? ? else ? ? ? ? cout<<"沒有找到該學(xué)生"< >cp; ? ? k=snum(cp); ? ? if(k!=-1) ? ? {cout<<"已找到,請輸入新的信息。"< stu[k+1].sum) ? ? ? ?{t=stu[k].sum;stu[k].sum=stu[k+1].sum;stu[k+1].sum=t;flag=1;} ? ? ? ?if (flag==0) ? ? ? ?break; ? ? } ? ? for( k = 0; k >dp; ? ? y=snum(dp); ? ? if(y!=-1) ? ? { ? ? for(;y >y; ? ? switch(y) ? ? { ? ? case 1:h.add();break; ? ? case 2:h.display();break; ? ? case 3:h.change();break; ? ? case 4:h.sort();break; ? ? case 5:h.find();break; ? ? case 6:h.dele();break; ? ? case 7:ss="n";break; ? ? } ?? ?}while(ss=="y"); ? ? return 0; }
原文鏈接:https://blog.csdn.net/wind_day/article/details/76468175
相關(guān)推薦
- 2022-06-18 C#如何實現(xiàn)dataGridView動態(tài)綁定數(shù)據(jù)_C#教程
- 2022-06-09 Entity?Framework?Core基于數(shù)據(jù)模型創(chuàng)建數(shù)據(jù)庫_實用技巧
- 2022-08-28 C++實現(xiàn)貪心算法的示例詳解_C 語言
- 2022-12-22 Python?Flask框架實現(xiàn)Proteus仿真Arduino與網(wǎng)頁數(shù)據(jù)交互_python
- 2022-05-20 Spring JdbcTemplate 快速上手
- 2022-11-03 Python入門教程之三元運算符的使用詳解_python
- 2023-01-15 SqlServer?多種分頁方式?詳解(含簡單速度測試)_MsSql
- 2022-08-07 API處理Android安全距離詳情_Android
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細win安裝深度學(xué)習(xí)環(huán)境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎(chǔ)操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權(quán)
- redisson分布式鎖中waittime的設(shè)
- maven:解決release錯誤:Artif
- restTemplate使用總結(jié)
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實現(xiàn)加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務(wù)發(fā)現(xiàn)-Nac
- Spring Security之基于HttpR
- Redis 底層數(shù)據(jù)結(jié)構(gòu)-簡單動態(tài)字符串(SD
- arthas操作spring被代理目標(biāo)對象命令
- Spring中的單例模式應(yīng)用詳解
- 聊聊消息隊列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支