校园卡信息管理系统

上传人:kms****20 文档编号:40567792 上传时间:2018-05-26 格式:DOC 页数:6 大小:29KB
返回 下载 相关 举报
校园卡信息管理系统_第1页
第1页 / 共6页
校园卡信息管理系统_第2页
第2页 / 共6页
校园卡信息管理系统_第3页
第3页 / 共6页
校园卡信息管理系统_第4页
第4页 / 共6页
校园卡信息管理系统_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《校园卡信息管理系统》由会员分享,可在线阅读,更多相关《校园卡信息管理系统(6页珍藏版)》请在金锄头文库上搜索。

1、校园卡信息管理系统校园卡信息管理系统#include #include struct student long int num;char name20;int money;int n=0;struct student stu100;struct student *p;void lr();void cx();void xg();void main()int z;printf(“+-+n“);printf(“| 欢迎使用学生校园卡信息管理系统 |n“);printf(“+-+n“);printf(“提示:为保证您的操作得到保存,请按正常顺序退出系统_n“);doprintf(“nttt-n“);p

2、rintf(“ttt+ 主菜单 |n“);printf(“ttt-n“);printf(“ttt+ 1-录入校园卡信息 |n“);printf(“ttt+ 2-查询校园卡信息 |n“);printf(“ttt+ 3-修改校园卡信息 |n“);printf(“ttt+ 0-退出系统 |n“);printf(“ttt-n“);printf(“请输入您的选择:“);scanf(“%d“, switch(z)case 0 : break;case 1 :lr();break;case 2 :cx();break;case 3 :xg();break;default:printf(“n 无效选项!“);

3、while(z!= 0);getchar();void lr()/*录入函数*/int y;if(n=0)p=stu;doprintf(“-n“);printf(“请输入学生的学号:“);scanf(“%ld“,printf(“请输入学生的姓名:“);scanf(“%s“,p-name);printf(“请输入学生的金额:“);scanf(“%d“,n+;p+;printf(“n1.继续输入.n0.输入完毕.n“);printf(“请选择:“);scanf(“%d“,while(y=1);printf(“提示:输入完毕!你一共输入%d 个n“,n);void cx()/*查询函数*/int c

4、;int w,i,j=0;if(n!=0)do printf(“n“);printf(“+-+n“);printf(“| 按学号查询 请按 1 |n“); printf(“| 取消 请按 0 |n“);printf(“+-+n“);printf(“请输入您的选择:“);scanf(“%d“, switch(c)case 0:break;case 1:printf(“请输入学生的学号;“);scanf(“%ld“, printf(“n“);for(i=0;in;i+)if(stui.num=w)printf(“n 学号t 姓名t 金额n“);printf(“%ldt%st%dn“,stui.nu

5、m,stui.name,stui.money);j=1;if(j=0)printf(“提示:没有该卡记录,请核对!“);break;default:printf(“n 提示:无效选项!“);break;while(c!= 0);else printf(“提示:无该卡数据,请输入数据!“);return;void xg()/*修改函数*/long int num;int i,j,c;if(n!=0)printf(“请输入您要修改的学生的学号:“);scanf(“%ld“, printf(“n“);for(i=0;in;i+)if(stui.num=num)j=i;doprintf(“请选择您要修

6、改的学生的信息内容:n“);printf(“+-+n“);printf(“| 姓名 请按 1 |n“);printf(“| 金额 请按 2 |n“);printf(“| 学号 请按 3 |n“); printf(“| 取消 请按 0 |n“);printf(“+-+n“);printf(“请输入您的选择:“);scanf(“%d“, printf(“n“);switch(c)case 0:break;case 1:printf(“请输入新姓名:“);scanf(“%s“,stuj.name);break;case 2:printf(“请输入新金额:“);scanf(“%d“,stuj.money);break;case 3:printf(“请输入新学号:“);scanf(“%s“,stuj.num);break;default:printf(“n 无效选项!“);break;while(c!= 0);else printf(“提示:无该卡数据,请输入数据!“);

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 科普知识

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号