当前位置:首页 » 编程语言 » c语言网吧管理系统设
扩展阅读
webinf下怎么引入js 2023-08-31 21:54:13
堡垒机怎么打开web 2023-08-31 21:54:11

c语言网吧管理系统设

发布时间: 2023-01-22 09:05:29

① 大神求助~~~~求一份用c语言编写的网吧计费管理系统,

/*应该建立有头结点的链表,否则,如果删除的数据刚好是第一个结点时,麻烦就大了。代码改动处较多,已经过不完全测试,可以运行。*/#include#includestructstu{intnum;charname[20];floatsorce;structstu*next;};voidoutput_sc(structstu*head){structstu*p;for(p=head->next;p;p=p->next)printf("%d%s%f\n",p->num,p->name,p->sorce);printf("\n");}structstu*creat(){structstu*head,*p;inti,n,len;len=sizeof(structstu);printf(":");scanf("%d",&n);printf("pleaseinputstudentsdetials\n");head=p=(structstu*)malloc(len);for(i=0;inext=(structstu*)malloc(len);scanf("%d%s%f",&p->next->num,p->next->name,&p->next->sorce);p=p->next;}p->next=NULL;return(head);}intdel(structstu*head){structstu*p,*q;intnum;printf("请输入要删除的学号:");scanf("%d",&num);if(head->next==NULL){printf("此链表为空\n");return0;}p=head;while(p->next!=NULL){if(p->next->num==num){q=p->next;p->next=q->next;free(q);return1;}p=p->next;}printf("未找到相关信息\n");return0;}voidoutput_df(structstu*head){structstu*p;FILE*fp;if((fp=fopen("D:\\data.txt","at+"))==NULL){printf("该文件不存在\n");exit(0);}for(p=head->next;p!=NULL;p=p->next)fprintf(fp,"%d%s%f\n",p->num,p->name,p->sorce);fclose(fp);}voiddf_sc(structstu*head){structstus;FILE*fp;fp=fopen("D:\\data.txt","r");if(fp==NULL){printf("无法打开文件\n");exit(0);}while(!feof(fp)){fscanf(fp,"%d%s%f",&s.num,s.name,&s.sorce);printf("%d%s%f\n",s.num,s.name,s.sorce);}fclose(fp);}voidmain(){structstu*head;while(1){intn;printf("\t***********************************************\n");printf("\t\t欢迎使用学生成绩管理系统\n");printf("\t\t1.creat2.del\n");printf("\t\t3.out-screen4.out-datafaile\n");printf("\t\t5.datafaile-screen6.exit\n");printf("\t***********************************************\n");printf("\t\tpleaseinputselct1--6\n");printf("Selectplease:");scanf("%d",&n);switch(n){case1:head=creat();break;case2:del(head);break;case3:output_sc(head);break;case4:output_df(head);break;case5:df_sc(head);break;case6:exit(0);break;}}}

② 请问可以在网吧用C语言编程么具体怎么做我刚开始学C语言,没什么基础,高一学生,要学会有难度

可以,不过最好还是在自己机器上。因为开发软件在安装的时候,都会往系统里写很多信息,如果在网吧的,被还原了那下次又得重新装。
个人比较喜欢C语言,如果你不嫌麻烦的话,下一个几百M大小的vc6.0随身带着,用的时候就安装一下,要么你下个TC2.0 这个比较小,不过界面不怎么人性化,基本是键盘操作。
任何一种编程语言,特别是像C这样对算法要求比较高的语言,都要有严谨的逻辑思维能力。个人推荐学C打基础。

③ 求个c++网吧管理系统代码

#include<iostream>

#include<fstream>

usingnamespace

std;

classdevice

{public:

charname[10];//

物品名称

charcolor[10];//

物品颜色

charaddress[50];//

厂商地址

charfactory[50];//

生产厂商

chartype[20];//

物品型号

intyear,month,day;//

出厂日期

intnumber;//

物品数量

device(){}//

构造函数

~device(){}//

析构函数

virtualvoidpay(){}//

设置价格函数

};

classTV:virtualpublicdevice

{public:

TV(){}

voidset1(char*n,char*c,char*a,char*f,char*t,inty,intm,intd,intnn)

{strcpy(name,n);

strcpy(color,c);

strcpy(address,a);

strcpy(factory,f);

strcpy(type,t);

year=y;

month=m;

day=d;

number=nn;

}

voidpay(){price1=3000;}//

普通电视机售价

floatprice1;

};

classDVD:virtualpublicdevice

{public:

DVD(){}

voidset2(char*n,char*c,char*a,char*f,char*t,inty,intm,intd,intnn)

{strcpy(name,n);

strcpy(color,c);

strcpy(address,a);

strcpy(factory,f);

strcpy(type,t);

year=y;

month=m;

day=d;

number=nn;

}

voidpay(){price2=2000;}//DVD

售价

floatprice2;

};

classTV_DVD:publicTV

,publicDVD

{public:

TV_DVD(){}

voidset3(char*n,char*c,char*a,char*f,char*t,inty,intm,intd,intnn)

{strcpy(name,n);

strcpy(color,c);

strcpy(address,a);

strcpy(factory,f);

strcpy(type,t);

year=y;

month=m;

day=d;

number=nn;

}

voidpay(){price=(2000+3000)*80/100;}//

DVD

的普通电视机售价

floatprice;

};

TVt1[20];DVDd1[20];TV_DVDtd1[20];

staticintk(0),k1(0),k2(0);

voidmain()//

主函数

{voidcaidan();

caidan();

}

voidcaidan()

{voidemployw();//

信息录用

voidaddw();//

添加物品信息

voidshown();//

显示物品信息

voidselectw();//

删除物品信息

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

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

⑤ 网络域名管理系统(C语言程序设计)

域名注册 企业邮局 通通网络服务器租用 托管 月付450元起

⑥ 如何用c语言编写网吧管理系统

单靠C是不可能写出管理系统的,要好多别的语言的支持,你去网站下点别的语言程序,整和一下比较好.