c语言项目设计医院挂号系统(经典)
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
#include<stdio.h>
void search();
void main()
{
int f;
printf(" ************************************************************\n");
printf("欢迎访问XX附属医院挂号系统!\nWelcome to Hohai University Hospital in Chang Zhou!\n");
printf("************************************************************\n");
printf("1.进入 2.退出\n1.Enter 2.Exit\n");
scanf("%d",&f);
if(f==1)
search();
else
printf("感谢访问!\n Thanks for visit!\n");
}
void search()
{
int d[18],g[3],a,b,c,x,y,h;
printf("请选择您需要的服务:\n1.预约挂号\n2.退定预约\n1.make an appointment\n2.draw back an appointment\n");
scanf("%d",&a);
if(a>2||a<1)
{
printf("您输入有误请您重试!\ninput error please try again!\n");
}
else switch(a)
{
case 1:
{
printf("请您输入您的18位身份证号码:\nplease input your ID(18 numbers):\n");
scanf("%d",&d[18]);
printf("您已登陆成功!\nLogin successful!\n");
printf("请您选择预约科室:\nPlease choose your reservation department:\n");
printf("1.外科\n2.内科\n3.五官科\n4.急诊科\n5.健康体检中心\n1.Surgery Dept\n2.Internal medicine Dept\n3.Ent\n4.Emergency Dept\n5.Health examination center\n");
scanf("%d",&b);
switch(b)
{
case 1:
printf("请预交款为10元。
\nPlease pay money for 10 yuan\n");
printf("1.确定2.返回");
scanf("%d",&h);
printf("您已预约成功★预约号为15号\nSuccessful appointment★the number is
15\n");break;
case 2:
printf("请预交款为12元。
\nPlease pay money for 12 yuan\n");
printf("1.确定2.返回");
scanf("%d",&h);
printf("您已预约成功★预约号为03号\nSuccessful appointment★the number is 03\n");break;
case 3:
printf("请预交款为5元。
\nPlease pay money for 5 yuan\n");
printf("1.确定2.返回");
scanf("%d",&h);
printf("您已预约成功★预约号为08号\nSuccessful appointment★the number is 08\n");break;
case 4:
printf("请预交款为8元。
\nPlease pay money for 8 yuan\n");
printf("1.确定2.返回");
scanf("%d",&h);
printf("您已预约成功★预约号为01号\nSuccessful appointment★the number is 01\n");break;
case 5:
printf("请预交款为30元。
\nPlease pay money for 30 yuan\n");
printf("1.确定2.返回");
scanf("%d",&h);
printf("您已预约成功★预约号为23号\nSuccessful appointment★the number is 23\n");break;
default :printf("您的输入有错请您重试\ninput error please try again!\n");
}
}
break;
case 2:
{
printf("请您输入您的18位身份证号码:\nplease input your ID(18 numbers):\n");
scanf("%d",&d[18]);
printf("您已登陆成功!\nLogin successful!\n");
printf("请您选择退订预约科室:\nPlease choose unsubscribe reservation department:\n");
printf("1.外科\n2.内科\n3.五官科\n4.急诊科\n5.健康体检中心\n1.Surgery Dept\n2.Internal medicine Dept\n3.Ent\n4.Emergency Dept\n5.Health examination center\n");
scanf("%d",&c);
switch(c)
{
case 1:printf("请您输入要退定的预约号码:\ninput the number:\n");
scanf("%d",&g[3]);
printf("我们将退您10元。
\nWe will refund you 10 yuan.\n");
printf("您退定成功,谢谢您的光临!\nThank you for your coming\n");break;
case 2:printf("请您输入要退定的预约号码:\ninput the number:\n");
scanf("%d",&g[3]);
printf("我们将退您12元。
\nWe will refund you 12 yuan.\n");
printf("您退定成功,谢谢您的光临!\nThank you for your coming\n");break;
case 3:printf("请您输入要退定的预约号码:\ninput the number:\n");
scanf("%d",&g[3]);
printf("我们将退您5元。
\nWe will refund you 5 yuan.\n");
printf("您退定成功,谢谢您的光临!\nThank you for your coming\n");break;
case 4:printf("请您输入要退定的预约号码:\ninput the number:\n");
scanf("%d",&g[3]);
printf("我们将退您8元。
\nWe will refund you 8 yuan.\n");
printf("您退定成功,谢谢您的光临!\nThank you for your coming\n");break;
case 5:printf("请您输入要退定的预约号码:\ninput the number:\n");
scanf("%d",&g[3]);
printf("我们将退您30元。
\nWe will refund you 30 yuan.\n");
printf("您退定成功,谢谢您的光临!\nThank you for your coming\n");break;
default :printf("您的输入有错请您重试\ninput error please try again!\n");
}
}
break;
}
{
int n;
printf("感谢光临!\n是否要再预约或退订预约? 1.是 2.否\nThank you for your coming!\nIf you want to make another appointment or rescind the appointment?\n1.yes 2.no\n");
scanf("%d",&n);
if(n==1)
search();
else
printf("再见!\ngood bye!\n");
}
}。