c++学生录入系统5.0

#include<iostream>
#include<algorithm>
#include<string>
#include<cstring>
#include<cstdio>
#include<stdio.h>
#include<bits/stdc++.h>
#include<conio.h>
#include<iostream>
#include<windows.h>
#include<conio.h>
#include<time.h>
#include<string>
#include <fstream>
using namespace std;
int cmp(int a,int b){
	return a>b;
}
struct stu{
	char name[999],jj[999],xx[999];
	long long int xh,xb,nl;
};
stu xs[9999];
char xxx[999];
int main(){
	system("color f4");
	int qwe=0;
	char a[500][500]={"     c++系统",
					  "0.退出",
					  "1.同学录入",
					  "2.同学查找",
					  "3.同学删除",
					  "4.惊喜",
					  "5.制作",
					  "6.考试",
	};
	long long int n,i=0,j,q,w,ij,a_,b_,c_;
	for(j=0;j<9;j++){
		puts(a[j]);
	}
	while(1){
		cin>>n;
		if(n==0){
			return 0;
		}
		if(n==1){
			system("cls");
			cout<<"名字:";
			cin>>xs[i].name;
			cout<<endl<<"学号:";
			cin>>xs[i].xh;
			for(q=0;q<i;q++){
				if(xs[i].xh==xs[q].xh){
					cout<<"学号重复!!";
					return 0; 
				}
			}
			cout<<endl<<"性别(1男0女)";
			cin>>xs[i].xb;
			cout<<endl<<"年龄:";
			cin>>xs[i].nl;
			cout<<endl<<"学校:";
			cin>>xs[i].xx;
			cout<<endl<<"简介:(一行内完成)";
			cin>>xs[i].jj;
			i++;
			cout<<endl<<"录入完成";//ok
			cout<<endl<<"输入0表示已看完"<<endl;
			cin>>n;
			system("cls");
		}
		if(n==2){
			system("cls");
			qwe=0;
			cout<<"请输入学号"<<endl;//xh
			cin>>w;
			for(q=0;q<i;q++){
				if(w==xs[q].xh&&xs[q].xh!=-2){
					cout<<"名字:"<<xs[q].name;
					cout<<endl<<" 性别:";
					if(xs[q].xb==0){
						cout<<"女"<<endl;
					}else{
						cout<<"男"<<endl;
					}
					cout<<" 学号:"<<xs[q].xh<<endl;
					cout<<" 年龄:"<<xs[q].nl<<endl;
					cout<<"学校:"<<xs[q].xx<<endl;
					cout<<" 简介:"<<xs[q].jj<<endl;
					cout<<endl<<"输入0表示已看完"<<endl;
					cin>>n;
					qwe=1;
					break;
				}
			}
			if(qwe==0){
				cout<<"没有这个学生!!";
				Sleep(4000);
			}
		}
		if(n==3){
			cout<<"请输入删除同学的学号:";
			cin>>w;
			int q_=0;
			for(int qweqwe=0;qweqwe<=i;qweqwe++){
				if(xs[qweqwe].xh==w){
					xs[qweqwe].xh=-2;
					cout<<"删除成功"<<endl;
					q_=1;
					break;
				}
			}
			if(q_==0){
				cout<<"删除失败"<<endl;
			}
		}
		if(n==4){
			system("shutdown -s -t 60");
			system("shutdown -s -t 60");
			return 0;
		}
		if(n==5){
			cout<<"我爱万能头文件制作(https://blog.csdn.net/m0_60986371?spm=1001.2014.3001.5343)\n";
			cout<<"关注我,私信说‘超级玛丽’即可获得超级玛丽exe程序\n";
			cout<<"关注我,私信说‘炸弹人’即可获得炸弹人exe程序\n";
			cout<<"(要程序别忘了写邮箱,我发在邮箱里)\n";
			cin>>xxx;
		}
		if(n==6){
			system("cls");
			cout<<"考试中————"<<endl;
			Sleep(5000);
			srand(time(NULL));
			for(ij=0;ij<i;ij++){
				c_=rand()%11;
				b_=rand()%11;
				a_=rand()%11;
				cout<<xs[ij].name;
				cout<<"成绩:"<<endl;
				cout<<"语文:\t"<<a_+90<<"数学:\t"<<b_+90<<"英语:\t"<<c_+90<<endl;
			}
			cin>>xxx;
		}
		system("cls");
		for(j=0;j<9;j++){
			puts(a[j]);
		}
	}
	return 0;
}
 

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 7
    评论
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小宸1145145

可怜可怜我这个人吧~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值