- 博客(1)
- 资源 (1)
- 收藏
- 关注
原创 谁知道错在呢?请指教
<br />#include "stdio.h"<br />#include "stdlib.h"<br />#include<conio.h><br />#include "string.h"/*字符串函数*/<br />#include "ctype.h" <br />#define M 50 <br />typedef struct /*定义数据结构*/<br />{<br /> char name[20];<br /> char units[30];<br /> char tele[10]; <br
2010-06-20 10:26:00 239
学生成绩管理系统.cpp
学生成绩管理系统
#include "conio.h"
#include"string.h"
#define YELLOW 2
look();
save();
search_name();
search_number();
order();del();
open1();
welcome();
type();
struct student /*定义学生信息的结构题类型*/
{
char num[15];
char name[20];
char sex[4];
int english;
int math;
int chinese;
float aver;
float sum;
}stu[100];
int n;
void main() /*主函数即用户的操作界面*/
{
int b,flag=0;
//textcolor(YELLOW); /*设计文本颜色*/
//textbackground(BLACK); /*设计窗体的背景颜色*/
while(1)
{
// clrscr();
printf("\n\t\t\tWelcome To The System of the student!\n");
printf("\n\t\t\t\t\tBy LiuShiyang\n");
printf("\n\n\n\t\t\t-----------------------------------\n");
printf("\t\t\t1.Type in the students information\n\n");/*键入学生的信息*/
printf("\t\t\t2.Look at the students information\n\n"); /*查看录入的学生信息*/
printf("\t\t\t3.Search the students information on name\n\n");/*按姓名查看学生的信息*/
printf("\t\t\t4.Search the students information on number\n\n");/*按学号查看学生的信息*/
printf("\t\t\t5.Put the scores in order\n\n"); /*排序*/
printf("\t\t\t6.Delete the students information\n\n");/*删除学生信息*/
printf("\t\t\t7.Save the students information\n\n");/*保存*/
printf("\t\t\t8.Open the file\n\n");/*打开文件*/
printf("\t\t\t9.Intorduction of LiuShiyang\n\n");/*我的个人信息*/
printf("\t\t\t0.Quit\n\n"); /*退出*/
printf("\t\t\tPlease type in your choice:");
scanf("%d",&b);
switch(b)
{
case 1: type();break; /*调用查看函数*/
case 2: look();break; /*调用查看函数*/
case 3: search_name();break; /*调用姓名查询函数*/
case 4: search_number();break;/*调用学号查询函数*/
case 5: order();break; /*调用排序函数*/
case 6: del();break;/*调用删除函数*/
case 7: save();break;/*调用保存函数*/
case 8: open1();break;/*调用打开文件函数*/
case 9: welcome();break; /*调用我的个人信息函数*/
case 0: flag=1; break;/*退出SWITCH语句*/
defalut:printf("Error!");
}
可在VC中运行
2010-06-19
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人