当前位置:首页 » 编程语言 » c语言设计管理系统

c语言设计管理系统

发布时间: 2022-03-08 05:35:55

1. 用c语言设计一个学生管理系统

高二的时候,我自己写过。现在在学其它的语言,就不献丑了,在网上给你找到了,是网络文库里面的,直接复制过来的话,排版不对,你自己去看一下吧,完整的代码。
名字就是《用C语言编写的一个学生信息管理系统》
PS:写这个,主要是用到C语言的链表,不难,只是有的时候,如果思路不清晰的话,容易写错,写漏等等,如果不参考上面,而是你自己写的话,建议先画个大概的树图出来,再开始编吧。

纯手工打的,帮到你的话,就采纳吧。

2. c语言 设计一个银行管理系统

功能:能够输入和查询客户存款取款记录。在客户文件中,每个客户是一条记录,包括编号、客户姓名、支取密码、客户地址、客户电话、账户总金额;在存取款文件中,每次存取款是一条记录,包括编号、日期、类别、存取数目、经办人。类别分为取款和存款两种。本系统能够输入客户存款或取款记录;根据客户姓名查询存款和取款记录。分步实施:1、初步完成总体设计,搭好框架,确定人机对话界面,确定函数个数;2、建立一个文件,输入客户的必要信息,能对文件进行显示、输入、修订、删除等。3、进一步要求:完成客户姓名查询存款和取款记录,并能得到每次帐户总金额。要求:1、用C语言实现系统;2、利用结构体数组实现信息的数据结构设计;3、系统的各个功能模块要求用函数的形式实现;4、界面友好(良好的人机交互),程序加必要的注释。课程设计实验报告要求:1、预习报告:题目、课程设计任务、数据结构、程序的总体设计(算法)、模块划分 。2、实验总结报告:流程图、主要源程序代码(需打印)、测试情况及调试中问题与解决方案、小结等要求:标明所用函数的用途和目的,简单叙述制作思路。
是否可以解决您的问题?

3. 用C语言设计图书管理系统

addbook()
{
FILE *fp;
int i=0;
char choice='y';
fp=fopen("book.txt","a+");
while(choice=='y'||choice=='Y')
{
i++;
printf("\n\t\t\t〓〓〓〓〓欢迎进入管理系统〓〓〓〓〓\n\n");
printf("\t\t\t请你输入第%d本书的序号 \n",i);
scanf("%s",&book[i].booknum);
printf("请你输入书名\n");
scanf("%s",book[i].bookname);
printf("请你输入书的作者\n");
scanf("%s",book[i].bookcreat);
printf("请设为1或0,1代表书还没人借,0表示书已经借出,设其他值,程序运行时无法得出正常结果\n");
printf("请你设定书的状态\n");
scanf("%d",&book[i].turefalse);
fwrite(&book[i],sizeof(struct book),1,fp);
printf("是否要输入下本书? 提示:输入下一本书时;Y/y,不输入下一本书时任意键返回\n");
if(choice=='y'||choice=='Y')
scanf("%s",&choice);
}
fclose(fp);
return;

}
delbook()
{
FILE *fp,*fp2;
int i;
char bookname[10],choice;
fp=fopen("book.txt","r");
fp2=fopen("bookl.txt","w");
printf("请输入你要删除的书名\n");
printf("如果你输入的书名存在,系统自动删除该信息!如果不存在,系统不做任何改动\n");
scanf("%s",bookname);
for(i=0;fread(&book[i],sizeof(struct book),1,fp)!=0;i++)
{
if(strcmp(bookname,book[i].bookname)!=0)
{
fwrite(&book[i],sizeof(struct book),1,fp2);
}
}
fclose(fp);
fclose(fp2);
printf("是否真的要删除该书籍?删除后该书籍的所有信息将无法恢复《Y/N》\n");
scanf("%s",&choice);
if(choice=='y'||choice=='Y')
{
fp=fopen("book.txt","w");
fp2=fopen("bookl.txt","r");
for(i=0;fread(&book[i],sizeof(struct book),1,fp2)!=0;i++)
{
fwrite(&book[i],sizeof(struct book),1,fp);
}
fclose(fp);
fclose(fp2);
fp2=fopen("bookl.txt","w");
fclose(fp2);
printf("按任意键返回\n");
getch();
return;
}
else
{
printf("按任意键返回\n");
getch();
return;
}
}
huanbook() /*还书函数*/
{
FILE *fp,*fp2; /*定义两个文件指针,fp2用于修改数据时设立临时文件用,防止数据遭破坏*/
int i,n;
int carnum;
char lendbook[10];

printf("请你输入你的卡号\n");
scanf("%d",&carnum);
fp=fopen("car.txt","r"); /*读取卡号记录*/
for(i=0;fread(&car[i],sizeof(struct car),1,fp)!=0;i++) /*for循环判断卡号是否存在*/
{
if(car[i].carnum==carnum) /*卡号存在,进入下一循环*/
{
n=i;
fclose(fp);
printf("请输入你要还的书的名字\n");
scanf("%s",lendbook);
fp=fopen("record.txt","r");
for(i=0;fread(&student[i],sizeof(struct student),1,fp)!=0;i++) /*判断是否借阅了输入的书*/
{
if(strcmp(student[i].lendbook,lendbook)==0) /*借阅了该书,进入下一循环,否则出错显示*/
{
fclose(fp);
fp=fopen("record.txt","r");
fp2=fopen("bookl.txt","w");
for(i=0;fread(&student[i],sizeof(struct student),1,fp)!=0;i++)
{
if(strcmp(student[i].lendbook,lendbook)==0)
{
continue; /*删除还掉的书的借书记录*/
}
fwrite(&student[i],sizeof(struct student),1,fp2); /*写入原来没还的书的记录*/
}
fclose(fp);
fclose(fp2);
fp=fopen("record.txt","w");
fp2=fopen("bookl.txt","r");
for(i=0;fread(&student[i],sizeof(struct student),1,fp2)!=0;i++)
{
fwrite(&student[i],sizeof(struct student),1,fp); /*将借书记录信息写回*/
}
fclose(fp);
fclose(fp2);
fopen("bookl.txt","w"); /*清临时文件的记录*/
fclose(fp2);
fp=fopen("book.txt","r");
fp2=fopen("bookl.txt","w");
for(i=0;fread(&book[i],sizeof(struct book),1,fp)!=0;i++) /*将书的记录写入临时文件,防止因为修改信息破坏以前的记录*/
{
if(i==n)
{
book[i].turefalse=1;
fwrite(&book[i],sizeof(struct book),1,fp2); /*将还的书的原来状态设为无人借阅的*/
continue;
}
fwrite(&book[i],sizeof(struct book),1,fp2);
}
fclose(fp);
fclose(fp2);
fp=fopen("book.txt","w");
fp2=fopen("bookl.txt","r");
for(i=0;fread(&book[i],sizeof(struct book),1,fp2)!=0;i++)
{
fwrite(&book[i],sizeof(struct book),1,fp); /*将临时文件写回*/
}
fclose(fp);
fclose(fp2);
fopen("bookl.txt","w"); /*清临时文件*/
fclose(fp2);
printf("还书完毕,按任意键返回\n");
getch();
return 1;
}
}
printf("你没有借这样的书,任意键返回\n"); /*出错提示*/
fclose(fp);
getch();
return 0;
}
}
printf("系统没这样的卡,和管理员联系,按任意键返回\n"); /*出错提示*/
fclose(fp);
getch();
}

findbook()
{
FILE *fp;
char bookname[10];
int ture,i;
fp=fopen("book.txt","r");
printf("请输入你要查找的书名\n");
scanf("%s",bookname);
for(i=0;fread(&book[i],sizeof(struct book),1,fp)!=0;i++)
{
if(strcmp(bookname,book[i].bookname)==0)
{
if(book[i].turefalse==1)
{
printf("这本书的详细资料是:%d %s %s 此书现在无人借阅\n按任意键返回\n",book[i].booknum,book[i].bookname,book[i].bookcreat);
}
else
{
printf("这本书已经有人借出\n");
fclose(fp);
return 0;
}
fclose(fp);
return FALSE;
}
}
printf("没有你要查询的书籍\n");
fclose(fp);
return FALSE;
}
chabook()
{
char ch5;
do
{
printf("\n\t\t\t〓〓〓〓〓欢迎进入学生管理系统〓〓〓〓〓\n\n");
printf(" \t\t\t1:<按书名查找>\n");
printf(" \t\t\t2:<按作者查找>\n");
printf(" \t\t\t0:<返回>\n");
printf("请输入0--2,其他输入非法!\n");
scanf("%s",&ch5);
switch(ch5)
{
case '1':findbook();getch();break;
case '2':findbook1();getch();break;
case '0':break;
default:printf("无此操作\n");getch();break;
}
}while(ch5!='0');
return FALSE;
}

lendbook()
{
FILE *fp,*fp2;
int i,n;
int carnum;
printf("请你输入你的卡号\n");
scanf("%d",&carnum);
fp=fopen("car.txt","r");
for(i=0;fread(&car[i],sizeof(struct car),1,fp)!=0;i++)
{
if(car[i].carnum==carnum)
{
n=i;
fclose(fp);
printf("请输入你要借阅的书的名字\n");
scanf("%s",student[n].lendbook);
fp=fopen("book.txt","r");
for(i=0;fread(&book[i],sizeof(struct book),1,fp)!=0;i++)
{
if(strcmp(book[i].bookname,student[n].lendbook)==0)
{
if(book[i].turefalse==0)
{
printf("对不起,此书有人借出,请借其他书\n");
fclose(fp);
getch();
return;
}
else
fclose(fp);
fp=fopen("record.txt","a+");
student[n].carnum=carnum;
fwrite(&student[n],sizeof(struct student),1,fp);
fclose(fp);
fp=fopen("book.txt","r");
fp2=fopen("bookl.txt","w");
for(i=0;fread(&book[i],sizeof(struct book),1,fp)!=0;i++)
{
if(strcmp(book[i].bookname,student[n].lendbook)==0)
{
book[i].turefalse=0;
fwrite(&book[i],sizeof(struct book),1,fp2);
continue;
}
fwrite(&book[i],sizeof(struct book),1,fp2);
}
fclose(fp);
fclose(fp2);
fp=fopen("book.txt","w");
fp2=fopen("bookl.txt","r");
for(i=0;fread(&book[i],sizeof(struct book),1,fp2)!=0;i++)
{
fwrite(&book[i],sizeof(struct book),1,fp);
}
fclose(fp);
fclose(fp2);
fopen("bookl.txt","w");
fclose(fp2);
printf("借书完毕,按任意键返回\n");
getch();
return;
}
}
printf("不存在这样的书,任意键返回\n");
fclose(fp);
getch();
return;
}
}
printf("你的卡号不存在,请申请新卡,按任意键返回\n");
fclose(fp);
getch();
}

4. C语言程序设计的图书管理系统

我们也开始做课程设计了呢~~~ 这是我同学做的:

#include
#include
#include

struct BOOK
{
int id,usr[10],total,store,days[10];
char name[31],author[21];
}books[100];
/*上面是结构体的定义,用于存放书籍及借书的信息。*/

void page_title(char *menu_item)
{
clrscr();
printf(">>> 图 书 管 理 系 统 <<<\n\n- %s -\n\n",menu_item);
}
/*上面是打印页眉的函数,同时通过参数menu_item,可以显示当前的状态。*/

void return_confirm(void)
{
printf("\n按任意键返回……\n");
getch();
}
/*上面是返回前请求确认的函数,以便在返回前观察结果*/

int search_book(void)
{
int n,i;
printf("请输入图书序号:");
scanf("%d",&i);
for(n=0;n<100;n++)
{
if(books[n].id==i)
{
printf("书名:%s\n",books[n].name);
printf("作者:%s\n",books[n].author);
printf("存数:%d of ",books[n].store);
printf("%d\n",books[n].total);
return n;
}
}
printf("\n输入错误或无效图书序号.\n");
return -1;
}
/*上面的函数是在数组中找到图书号匹配的记录,显示其信息并返
回数组下标,如果找不到相应记录则提示错误并返回-1。*/

void book_out(void)
{
int n,s,l,d;
page_title("借阅图书");
if((n=search_book())!=-1&&books[n].store>0)
{
printf("请输入借书证序号:");
scanf("%d",&s);
printf("请输入可借天数:");
scanf("%d",&d);
for(l=0;l<10;l++)
{
if(books[n].usr[l]==0)
{
books[n].usr[l]=s;
books[n].days[l]=d;
break;
}
}
books[n].store--;
}
if(n!=-1&&books[n].store==0) printf("此书已经全部借出.\n");
return_confirm();
}
/*上面是借书的函数,首先调用找书函数*/

void book_in(void)
{
int n,s,l;
page_title("归还图书");
if((n=search_book())!=-1&&books[n].store<books[n].total)
{
printf("借阅者图书证列表:\n");
for(l=0;l<10;l++)
if (books[n].usr[l]!=0)
printf("[%d] - %d天\n",books[n].usr[l],books[n].days[l]);
printf("请输入借书证序号:");
scanf("%d",&s);
for(l=0;l<10;l++)
{
if(books[n].usr[l]==s)
{
books[n].usr[l]=0;
books[n].days[l]=0;
break;
}
}
books[n].store++;
}
if(n!=-1&&books[n].store==books[n].total)
printf("全部入藏.\n");
return_confirm();
}

void book_add(void)
{
int n;
page_title("注册新书");
for(n=0;n<100;n++)
if(books[n].id==0) break;
printf("序号:");
scanf("%d",&books[n].id);
printf("书名:");
scanf("%s",&books[n].name);
printf("作者:");
scanf("%s",&books[n].author);
printf("数量:");
scanf("%d",&books[n].total);
books[n].store=books[n].total;
return_confirm();
}
void book_del(void)
{
int n;
page_title("注销旧书");
if((n=search_book())!=-1) books[n].id=0;
printf("该书已注销.\n");
return_confirm();
}

void main(void)
{
menu: page_title("操作选单");
printf("请用数字键选择操作\n\n");
printf("1 借阅图书\n2 归还图书\n\n");
printf("3 注册新书\n4 注销旧书\n\n");
printf("\n0 退出\n");
switch(getch())
{
case '1' : book_out();break;
case '2' : book_in();break;
case '3' : book_add();break;
case '4' : book_del();break;
case '0' : exit(0);
}
goto menu;
}
{
int n;
page_title("广?症慕");
if((n=search_book())!=-1) books[n].id=0;
printf("乎慕厮广?.\n");
return_confirm();
}

void main(void)
{
menu: page_title("荷恬佥汽");
printf("萩喘方忖囚佥夲荷恬\n\n");
printf("1 処堋夕慕\n2 拷珊夕慕\n\n");
printf("3 广过仟慕\n4 广?症慕\n\n");
printf("\n0 曜竃\n");
switch(getch())
{
case '1' : book_out();break;
case '2' : book_in();break;
case '3' : book_add();break;
case '4' : book_del();break;
case '0' : exit(0);
}
goto menu;
}

5. c语言设计学生信息管理系统

发消息给你了

6. C语言程序 如何编写管理系统

C语言编程的规则
C语言源程序的编程语法归纳如下:
1,强制性规则
1,一个C语言源程序必须有且只有一个MAIN函数.
2,函数名后必须紧跟圆括号对,函数体放在右圆括号")"后的花括号对"{}"中.
3,每个程序体(包括函数的函数体,含有多条语句的选择结构和循环结构中的语句序列)必须用一对花括号括起来.
4,文件包含预处理命令,#INCLUDE<*.H应置于源程序的开始位置.
5,语句未尾必须有分号,而预处理命令和函数首部的未尾及右花括号之后不要分号.
6,同一字母大,小写意义不同,关键字和标准库函数名必须用小写.
7,变量必须先定义,后使用
8,除已有明显间隔符外,标识符,关键字之间必须有至少一个空格9,注解必须包含在"/* */符号之间

7. 用C语言设计并实现一个员工信息管理系统

#include<iostream>
#include<cstring>
usingnamespacestd;

typedefstructwage{
charunit[8];
charname[10];
charsex[4];
charbirthdate[12];
chartitle[20];
doublebasewage;
doublesubsidy;
doubletax;
doubleexpenses;
doubleresialwage;
}WAGE;

voidComputerResialwage(WAGEa[],intn){
for(inti=0;i<n;++i)
a[i].resialwage=a[i].basewage+a[i].subsidy-a[i].tax-a[i].expenses;
}

voidPrintTitle(void){
cout<<"单位姓名性别出生年月职称基本工资津贴个税水电费实发工资 ";
for(inti=0;i<79;++i)cout<<"*";cout<<endl;
}

voidRowShow(WAGEa[],inti){
cout<<a[i].unit<<"";
if(strlen(a[i].name)==4){
a[i].name[6]=a[i].name[4];
a[i].name[5]=a[i].name[3];
a[i].name[4]=a[i].name[2];
a[i].name[2]=a[i].name[3]='';
}
cout<<a[i].name<<""<<a[i].sex<<""<<a[i].birthdate;
if(strlen(a[i].title)==4){
a[i].title[6]=a[i].title[4];
a[i].title[5]=a[i].title[3];
a[i].title[4]=a[i].title[2];
a[i].title[2]=a[i].title[3]='';
}
cout<<""<<a[i].title<<"";
cout.precision(2);
cout.width(8);
cout<<fixed<<a[i].basewage<<"";cout.width(6);
cout<<fixed<<a[i].subsidy<<"";
cout.width(8);
cout<<fixed<<a[i].tax<<"";
cout.width(6);
cout<<fixed<<a[i].expenses<<"";
cout.width(8);
cout<<fixed<<a[i].resialwage<<endl;
}

voidShow(WAGEa[],intn){
for(inti=0;i<n;++i)RowShow(a,i);
}

voidSearch1(WAGEa[],intn){
inti,flag=1;
for(i=0;i<n;++i){
if(strcmp(a[i].unit,"理学院")==0&&a[i].basewage>900.00&&
strcmp(a[i].title,"副教授")==0&&strcmp(a[i].sex,"男")==0){
RowShow(a,i);
flag=0;
}
}
if(flag)cout<<"(没找到符合条件者) ";
}

voidSearch2(WAGEa[],intn){
inti,flag=1;
for(i=0;i<n;++i){
if(strcmp(a[i].unit,"理学院")==0&&a[i].basewage<1200.00&&
strcmp(a[i].title,"教授")==0&&strcmp(a[i].sex,"男")==0){
RowShow(a,i);
flag=0;
}
}
if(flag)cout<<"(没找到符合条件者) ";
}

intmain(){
WAGEa[]={
{"理学院","赵志军","男","1957-06-25","教授",1150,411,176.6,90},
{"商学院","于铭","女","1979-10-21","助教",500,471,208.9,91},
{"工学院","许炎锋","女","1954-03-08","教授",1250,630,306.2,96},
{"理学院","王嘉","女","1971-06-06","讲师",850,475,100.3,89},
{"工学院","李新江","男","1962-10-02","教授",950,399,49.5,87},
{"商学院","郭海英","女","1963-02-07","副教授",950,332,77.6,85},
{"工学院","马淑恩","女","1960-06-09","副教授",900,791,60.5,45},
{"理学院","王金科","男","1956-09-10","教授",1050,480,325.6,93},
{"理学院","李东慧","女","1950-08-07","教授",1350,364,52.3,94},
{"工学院","张宁","女","1980-01-01","助教",500,395,78,89},
{"商学院","王孟","男","1966-09-08","讲师",800,463,220.3,98},
{"工学院","马会爽","女","1970-02-09","讲师",800,368,101.1,69},
{"工学院","史晓赟","女","1952-06-06","教授",1200,539,520.3,50},
{"理学院","刘燕凤","女","1959-08-07","教授",1200,892,180.9,86},
{"工学院","齐飞","男","1961-04-05","副教授",1200,626,245.6,74},
{"商学院","张娟","女","1975-09-25","助教",650,374,625.3,86},
{"理学院","潘成文","男","1965-10-09","讲师",950,402,1050,90},
{"工学院","邢易","女","1981-02-25","助教",600,325,300,90},
{"商学院","谢枭豪","女","1950-11-18","教授",1350,516,200,90},
{"工学院","胡洪静","女","1952-06-24","教授",1350,277,100,86},
{"工学院","李云飞","男","1969-05-04","讲师",960,729,56,89},
{"商学院","张奇","女","1970-05-28","讲师",960,331,69,89},
{"理学院","夏小波","女","1968-08-01","讲师",960,482,89,45},
{"工学院","王玮","女","1972-11-05","讲师",960,340,98,79},
{"理学院","张帝","女","1950-03-26","教授",1300,335,124,90},
{"商学院","孙帅","男","1966-05-24","讲师",900,748,326,79},
{"工学院","卜辉娟","女","1960-05-23","教授",960,481,651,78},
{"工学院","李辉玲","女","1978-09-09","助教",630,379,400,77},
{"理学院","刘亚静","男","1969-08-09","副教授",890,377,23,66},
{"工学院","尹娴","女","1958-06-09","教授",1050,955,59,65},
{"商学院","马春英","男","1964-12-06","讲师",850,387,78,69},
{"工学院","孟梦","女","1965-08-09","副教授",850,753,485.6,93},
{"工学院","梁晓萌","女","1975-06-09","助教",650,551,136.5,99},
{"理学院","张然","女","1973-03-03","讲师",800,761,203.1,100},
{"工学院","彭雁南","男","1978-05-09","助教",650,200,200,90}
};
inti,n=sizeof(a)/sizeof(a[0]);
if(n==0)return1;
ComputerResialwage(a,n);
PrintTitle();
for(i=0;i<n;++i)RowShow(a,i);
for(i=0;i<79;++i)cout<<"*";
cout<<endl;cout<<" 理学院,基本工资高于900元的男副教授有: ";
PrintTitle();
Search1(a,n);
for(i=0;i<79;++i)cout<<"*";
cout<<endl;
cout<<" 理学院,基本工资低于1200元的男教授有: ";
PrintTitle();
Search2(a,n);
for(i=0;i<79;++i)cout<<"*";
cout<<endl<<endl;
return0;
}

8. C语言—精简设计“学生信息管理系统”

我有这个代码 给楼主看看吧 希望可以帮上你的忙 http://www.henrysyw.cn/article.asp?id=1078

热点内容
python中或者怎么表示 发布:2025-01-13 16:32:33 浏览:288
易达加密锁 发布:2025-01-13 16:27:23 浏览:514
前端编译工具配置 发布:2025-01-13 16:26:43 浏览:585
数据库百度云 发布:2025-01-13 16:19:38 浏览:539
java连接sqlite数据库 发布:2025-01-13 16:19:36 浏览:768
htmlajax上传文件 发布:2025-01-13 16:19:33 浏览:514
安卓怎么时间显秒 发布:2025-01-13 16:19:33 浏览:474
我的世界java服务器管理员设置 发布:2025-01-13 16:18:44 浏览:493
大秦国之裂变ftp 发布:2025-01-13 15:59:01 浏览:371
谷能压缩机 发布:2025-01-13 15:44:30 浏览:413