请哪位高手帮我用C语言编一个酒店管理系统软件 ! 急!!!
在这个经济社会里谁还会免费的帮人家出这么大的力啊?你那酒店管理系统要求再简单也要花时间啊!再说你要它的原理,这不是要人家的知识产权吗?也许人家开发出来把软件打包给你还有可能。
幼稚。
这不是分的问题。。像这样的要求,这就算是做实际项目了,你应该出人民币了。
酒店管理系统,人家一些软件公司用几万甚至是十几万的成本去开发那么一套,你就希望在百度知道上搞定,可能么……
#define LEN sizeof(struct customer)
#include "string.h"
struct customer
{
int num;
char name[20];
long date;
struct customer *next;
}cus;
struct customer *creat(void) /*建立一个链表*/
{
struct customer *head,*p1,*p2;
int n=0;
p1=(struct customer *)malloc(LEN);
p2=(struct customer *)malloc(LEN);
printf("请输入客户的信息:\n");
printf("\n房间:");
scanf("%d",&p1->num);
printf("\n");
printf("姓名:");
scanf("%s",p1->name);
printf("\n");
printf("入住时间:");
scanf("%ld",&p1->date);
printf("\n");
head=NULL;
while(p1->num!=0)
{
n++;
if(n==1)
head=p1;
else
p2->next=p1;
p2=p1;
p1=(struct customer *)malloc(LEN);
printf("请输入客户的信息:\n");
printf("\n房间:");
scanf("%d",&p1->num);
printf("\n");
printf("姓名:");
scanf("%s",p1->name);
printf("\n");
printf("入住时间:");
scanf("%ld",&p1->date);
printf("\n");
}
p2->next=NULL;
return(head);
}
struct customer *insert(struct customer *head,struct customer *consumer) /*登记新入住的客户的信息*/
{
struct customer *p1,*p2;
p1=head;
p2=consumer;
if(p1->next!=NULL)
p1=p1->next;
if(p1->next==NULL)
{
p1->next=p2;
p2->next=NULL;
}
return(head);
}
struct customer *del(struct customer *head,int num) /*显示退房客户的信息*/
{
struct customer *p1,*p2;
if(head==NULL)
{
printf("没有客户的信息\n");
return(head);
}
p1=head;
while(num!=p1->num&&p1->next!=NULL)
{
p2=p1;p1=p1->next;
}
if(num==p1->num)
{
if(p1==head)
head=p1->next;
else
p2->next=p1->next;
printf("退房客户的信息:\n");
printf("客房:%d\n",&p1->num);
printf("姓名:%s\n",p1->name);
printf("入住时间:%ld\n",&p1->date);
}
else
printf("没有该客户的信息\n");
return(head);
}
struct customer *search(struct customer *head,char c_name[]) /*查询客户信息*/
{
struct customer *p;
p=head;
while(strcmp(p->name,c_name)&&p->next!=NULL)
p=p->next;
if(p->name==c_name)
{
printf("该客户的信息为:\n");
printf("房间:%d\n姓名:%S\n入住时间:%ld",p->num,p->name,p->date);
}
if(p->name!=c_name&&p->next==NULL)
printf("没有该客户的信息!\n");
}
void print(struct customer *head) /*打印出现有客户的信息*/
{
struct customer *p;
printf("\n现有客户信息为:\n");
p=head;
if(head!=NULL)
do
{
printf("客房:%d\n",p->num);
printf("姓名:%s\n",p->name);
printf("入住时间:%ld\n",p->date);
p=p->next;
}while(p!=NULL);
}
main()
{
struct customer *head,*p;
int m,number;
char c_name[20];
printf("\n");
printf(" ******************************\n");
printf(" 欢迎进入旅游信息管理系统\n");
printf(" ******************************\n");
printf(" ******************************\n\n");
printf(" 1:建库\n");
printf(" 2:登记\n");
printf(" 3:退房\n");
printf(" 4:查询\n");
printf(" ******************************\n\n");
printf("请执行操作:\n");
scanf("%d",&m);
if(m==1)
head=creat();
else
if(m==2)
{
printf("请输入要登记得客户的信息:");
p=(struct customer *)malloc(LEN);
scanf("%d %s %ld",&p->num,p->name,&p->date);
head=insert(head,p);
print(head);
}
else
if(m==3)
{
printf("请输入要退房的客户的房间号:");
scanf("%d",&number);
head=del(head,number);
print(head);
}
else
if(m==4)
{
printf("请输入要查询的客户的姓名:");
scanf("%s",c_name);
search(head,c_name);
}
else
printf("执行操作错误!");
}
有5个警告而已,不过已经很不错了
我要是不说这几句废话的话,典型的零回答问题。
您就是给十五万分悬赏,也不会有人跟您做的,因为这个工程也许值十五万人民币的
===================
我不会给你编写,但我知道做你这事用Delphi最合适,而不是C,要用C的话,复杂度和工期可能要增加几十倍,界面还用着不舒服——我只是指出你的要求对你的需要而言并不合理,你得自己在当地雇人去做。
我们这收费标准是
单机版2400元/年
而且不是星级酒店
相关视频
1000以内所有素数之和 C语言程序,请高手帮我编写下,谢谢啊!
include<stdio.h> void main(){ int a,i;long int sum=0;for(a=2;a<=1000;a++){ for(i=2;i<=a\/2;i++)if(a%i==0)break;if(i>a\/2)sum=sum+a;} printf("%ld",sum);getch();}
请教高手编写一个简单的C语言程序
给你写了一些情况的判断。其它情况自己添加。include<stdio.h> int strtoint(char *str, int *r){ int len,i;int status=0;len = 0;while ( 1==1){ if (str[len] == 0) break;len = len + 1;} if (len > 6 || len <= 0) {status = 1; return status;};if (str[0]...
高手们,帮我编几个c语言的小程序!!谢谢.明天就要交!!
3.编一C程序,它能读入两个整数m与n,计算并输出m与n的绝对值的最大公约数及最小公倍数 解:源程序如下:int gys (int x,int y){ int j;j=(x<y)?x:y;for(;j>0;j--)if(x%j==0&&y%j==0)break;else continue;return (j);} int gbs (int z,int w){ int i;i=(z>w)?
C语言编程求助!!!求高手帮忙!感激不尽!
include "stdio.h"include"string.h"int main(){ int i,s = 0; \/*请修改此处:int和i间有空格; 计算的和值s首先要清零 *\/ char str[80];i=0;while ((str[i]=getchar())!='\\n')i++;str[i]='\\0';for(i=0;i<80;i++)if (str[i]>='0' && str[i]<='9') \/*...
几道简单的C语言编程题,请高手帮忙
1、求1-3+5-7+……-99+101的值。include <stdio.h> void main(){ int i,element,sum=0;for(i=1;i<=101;i+=2){ element=-i;sum=sum+element;sum=-sum;} printf("%d\\n",sum);} 2、编写程序,判断一个数是否是素数。6n+1,6n-1法代码 include<stdio.h> int main(){ int ...
谁能帮我设计一个C语言程序,求解方程组的,急啊,哪位高手帮下咯,万分感 ...
;exit(1);} nu++;} while(fabs(dx)>1e-6);return x;} void main(){ int i;float *x;float c[12]={5,2,1,8,2,8,-3,21,1,-3,-6,1};float *GauseSeidel(float *,int);x=GauseSeidel(c,3);for(i=0;i<=2;i++)printf("x[%d]=%f\\n",i,x[i]);getch();} ...
c语言高手帮帮忙!
用数组就可以实现了。定义变量循环累加,打印结果。include <stdio.h>#define N 10int main(){ char names[4][3]={"张","王","李","赵"}; int i,t,n=N,cnt[4]={0},f=0,z=0,max=0; printf("当前共%d个投票人 ,请投张:1 王:2 李:3 赵:4 (输入-1结束投票)\\n...