C语言 学生信息管理系统 (未完...)

这是一个使用C语言编写的未完成的学生信息管理系统,程序适用于Dev C++、VC++和Visual Studio等编译环境。
摘要由CSDN通过智能技术生成

 

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<io.h>
#include<conio.h>
#include<windows.h>
//#include"got_account_us_num.h"
//#include"got_account_ad_num.h"

//#define Password_1 123456
const char *Password_1="123456"; //用户 
const char *Password_2="456789"; //管理员 
const char *type_us="User";
const char *type_ad="Administrator";
void got_account_id();
void View_1();
void password(char *type);   //登陆密码 
int sale();
int print();
void choise__1();
void print_file();  //输出文件信息 
int delet();   //删除数据 
int count;
int delet_file();  //删除文件 


struct stu{
	
	int id;
	char name[10];
	char sex[3];
	struct stu *next;
	struct stu *left,*right;	
}*phead,*pnew,*pend,*ptemp,*ppte;

struct stu_2
{
	int number;
	int id;
	char name[10];
	char sex[3];
};

struct file{
	char file_name[20];	
}name_1; 

struct account_file{
	
	char account_name[20];
	char account_password[6];
	char account_phone_number[11];
		
}account;

void create()   //创建链表 
{
	char choise_1;
	setvbuf(stdout,NULL,_IONBF,0);
	system("cls");
	count=0;
	pnew=(struct stu*)malloc(sizeof(struct stu));	
	printf("请你输入学生信息(\"结束\"结束输入)\n");
	printf("姓名  学号  性别\n");
	scanf("%s %d %s",pnew->name,&pnew->id,pnew->sex);
	while(strcmp(pnew->name,"结束"))
	{
		count++;
		if(count==1)
		{
			pnew->next=NULL;
			phead=pnew;
			ptemp=pnew;
		}
		else
		{
			pnew->next=NULL;
			ptemp->next=pnew;
			ptemp=pnew;
		}
		pnew=(struct stu*)malloc(sizeof(struct stu));
		scanf("%s",pnew->name);
		if(!strcmp(pnew->name,"结束")) break;
		else
		{
			scanf("%d %s",&pnew->id,pnew->sex);
		}
	}
	printf("输入信息成功\n"); 
//	system("pause");0
	free(pnew);
	do
	{ 
//		system("cls");
		printf("*************欢迎你使用学生信息管理系统*************\n");
		printf("----------------------------------------------------\n");
		printf("[M]保存信息\t[N]删除信息\t[F]嘻嘻嘻\n");
		printf("[A]返回主界面\t[S]查询信息\t[T]哈哈\n");
		printf("[Q]查询文件名\t[W]删除文件\t[R]退出\n");
		printf("你的选择是- "); 
		fflush(stdin);				//清空缓冲区 
		scanf("%c",&choise_1);
		switch(choise_1)
		{
			case 'M':
	
  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值