⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cpp

📁 学生信息管理系统的设计与开发主要实现以下功能1.学生基本信息的管理; 2、学生增减; 3、课程管理:课程的增加、修改、删除、查询等; 4、基础数据管理.
💻 CPP
字号:
#include<string.h>
#include<conio.h>
#include<stdlib.h>
#include <ctype.h>
#include"form.h"
#include"add.h"

int count=0;            //记录输入的学生数

////////////////////////////函数声明//////////////////////////   
void sortdate();                   //2.记录排序  
void printreport();                //3.打印学生成绩 
void searchstudents();             //6.查询学生信息
void statscore();                  //7.统计成绩
void out();                        //0.退出

////////////////////////////函数实现//////////////////////////
void main()
{
	do{
		system("cls");
		winmenulist();
		onlyoneinput(56,16);            //输入单个选项
		switch(key)
		{
		case '1':                       //1.添加学生信息
			addstudentinfo();
			getch();
			break;
		case '2':                       //2.记录排序
			sortdate();
			break;
		case '3':                       //3.打印学生成绩
			printreport();
			break;
		case '6':                       //6.查询学生信息
			searchstudents();
			break;
		case '7':                       //7.统计成绩
			statscore();
			break;
		case '0':
			out();
			continue;
		case '\r':
			continue;
		case ' ':
			continue;
		default:
			goxy(2,20);
			putchar(key);
			printf(" is a error number, please input a number between 0 to 7");
			goxy(2,21);
			printf("please input any key to continue");
			getch();
		}
	}while(1);
}

/////////////////////////2.记录排序//////////////////////////
void sortdate()
{
	scanf("%d",&key);
	system("cls");
	switch(key)
	{
	case '1':
		winstudengrade();
		goxy(31,3);
		printf("Rise By Student Number");
		goxy(1,21);
		printf("Please Enter Any Key TO Continue");
		break;
	case '2':
		winstudengrade();
		goxy(33,3);
		printf("Descend By Number");
		goxy(1,21);
		printf("Please Enter Any Key TO Continue");
		break;
	case '3':
		winstudengrade();
		goxy(35,3);
		printf("Rise By Total");
		goxy(1,21);
		printf("Please Enter Any Key TO Continue");
		break;
	case '4':
		winstudengrade();
		goxy(34,3);
		printf("Descend By Total");
		goxy(1,21);
		printf("Please Enter Any Key TO Continue");
		break;
		//case 5:
		//返回上级目录		
	}
}

///////////////////////////3.打印学生成绩/////////////////////////
void printreport()
{
	goxy(1,21);
	printf("Please Enter Any Key TO Continue");
}

///////////////////////////6.查询学生信息//////////////////////////
void searchstudents()
{
	scanf("%d",key);
	system("cls");
	switch(key)
	{
	case '1':
		winstudengrade();
		goxy(33,3);
		printf("Search By Number");
		goxy(1,21);
		printf("Please Input Any Key TO Continue");
		break;
	case '2':
		winstudengrade();
		goxy(35,3);
		printf("Search By Name");
		goxy(1,21);
		printf("Please Enter Any Key TO Continue");
		//		case 3:
		//返回上级目录
	}
}

///////////////////////////7.统计成绩/////////////////////////
void statscore()
{
	winstatscore();
}

////////////////////////////0.退出//////////////////////////
void out()
{	
	while(1)
	{	
		system("cls");
		winout();
		onlyoneinput(55,11);
		if (key=='Y'||key=='y')
			exit(0);
		else if(key=='N'||key=='n')
			break;
		else
		{
			goxy(2,20);
			putchar(key);
			printf(" is a error option,please input a option ( Y or N )");
			goxy(2,21);
			printf("please input anykey to continue");
			getch();
		}
	}
}




⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -