为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

学生信息程序C++源代码

2017-10-17 3页 doc 14KB 25阅读

用户头像

is_954223

暂无简介

举报
学生信息程序C++源代码学生信息程序C++源代码 #include #include using namespace std; struct date {int year,month,day;}; class Student { public: Student(); ~Student(){}; void modifystudent(); void showstudent() const; private: int number; int grade; int f; int n; char name[10]; c...
学生信息程序C++源代码
学生信息程序C++源代码 #include #include using namespace std; struct date {int year,month,day;}; class Student { public: Student(); ~Student(){}; void modifystudent(); void showstudent() const; private: int number; int grade; int f; int n; char name[10]; char clas[10]; char college[10]; char major[10]; char m[10]; date birthday; }; Student::Student() {cout<<"请输入学生学号:"; cin>>number; cout<<"请输入学生姓名:"; cin>>name; cout<<"请输入学生出生日期:"; cin>>birthday.year>>birthday.month>>birthday.day; cout<<"请输入学生的年级:"; cin>>grade; cout<<"请输入学生的班级:"; cin>>clas; cout<<"请输入学生的院系:"; cin>>college; cout<<"请输入学生的专业:"; cin>>major; } void Student::modifystudent() { cout<<"请输入你想要修改的学生信息:1.学号\t2.年级\t3.班级\t4.院系\t5.专业"<>f; cout<<"请输入修改后的内容:"<>n; else cin>>m; if(f==1||f==2) {switch(f) {case 1:number=n;break; case 2:grade=n;break; } }else switch(f) { case 3:{strcpy(clas,m);clas[sizeof(clas)-1]='\0';}break; case 4:{strcpy(college,m);college[sizeof(college)-1]='\0';}break; case 5:{strcpy(major,m);major[sizeof(major)-1]='\0';}break; } } void Student::showstudent() const {cout<<"您输入的学生信息如下所示:"<
/
本文档为【学生信息程序C++源代码】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索