【C语言】身份证管理系统【4】
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
【C语言】身份证管理系统【4】
/*Menu.c*/
#include "Head.h"
void Menu_Language_Select()
{
system("color 8f");
printf("\n◎请选择菜单语言 (Please select the language):\n");
printf("\n\t◎中文选择'0',英文选择'1' (for Chinese,press '0',for English,press '1')\n");
}
void Menu_Welcome_English(int language)
{ printf("\n ●Welcome to the ID Management System!\n");
printf(" ◎The system will offer lots of help to manage \n and to save the IDs' information!");
printf("\n\n *published by:zacks *date July 28th,2010 *version 8.01\n");
getch();
}
void Menu_Welcome_Chinese(int language)
{
printf("\n\t●欢迎进入身份证管理系统!\n\n");
printf("\n\t ◎本系统将会为您提供多种有关身份证信息管理和存储的功能,欢迎使用!\n");
printf("\n\t *制作者:李俊伟*时间2010年7月28日*版本8.01\n");
getch();
}
void Option_Menu_English()
{
system("color 1e");
printf("\n
◇◇◇◇◇◇◇◇◇◇◇◇◇◇Options◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇\n\n");
printf("\t\t◎ 1.Input the ID information,then write into a test \t\n");
printf("\t\t◎ 2.Input an ID number,then display the information \t\n");
printf("\t\t◎ 3.Give a province number,then calculate the population \t\n");
printf("\t\t◎ 4.Give an area number,then calculate the population \t\n");
printf("\t\t◎ 5.Give an ID number,then revise the information \t\n");
printf("\t\t◎ 6.Give an ID number,then delete the information \t\n");
printf("\t\t◎ 7.Count the population of same sex \t\n\n");
printf("\t\t◎ 8.Count the population about birthday \t\n\n");
printf("\t\t *Press 0 to exit\t*Press 10 to return\t\t\n\n");
printf("\t\t ◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇\t\n");
}
void Option_Menu_Chinese()
{
system("color 2b");
printf("\n ◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇菜单◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇\n\n");
printf("\t\t◎ 1.通过键盘输入身份证信息,并存放在文件中\t\t\n\n");
printf("\t\t◎ 2.给定身份证号码,显示其身份证信息 \t\t\n\n");
printf("\t\t◎ 3.给定省份的编号,显示该省的人数 \t\t\n\n");
printf("\t\t◎ 4.给定某区的编号,显示该区的人数 \t\t\n\n");
printf("\t\t◎ 5.给定身份证号码,可以修改该身份证信息 \t\t\n\n");
printf("\t\t◎ 6.给定身份证号码,可以删除该身份证信息 \t\t\n\n");
printf("\t\t◎ 7.统计同性别人数 \t\t\n\n");
printf("\t\t◎ 8.出生日期的相关统计 \t\t\n\n");
printf("\t\t *按0退出\t*按10返回\t\t\n\n");system("echo %date% %time%");
printf("\t\t ◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇\t\n");
}
void Secondary_Option_Menu_English()
{
system("color 1e");
printf("\n ◇◇◇◇◇◇◇◇◇◇◇◇Secondary_Options◇◇◇◇◇◇◇◇◇◇
◇◇◇◇◇\n\n");
printf("\t\t◎ 1.Count the people born in the same year\t\t\n\n");
printf("\t\t◎ 2.Count the people born in the same month\t\t\n\n");
printf("\t\t◎ 3.Count the people born in the same month and the same day\t\t\n\n");
printf("\t\t◎ 4.Count the people born in the same bithday\t\t\n\n");
printf("\t\t*press 0 to return\t\t\n\n");
printf("\t\t ◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇\t\n");
}
void Secondary_Option_Menu_Chinese()
{
system("color 2b");
printf("\n ◇◇◇◇◇◇◇◇◇◇◇◇◇◇二级菜单◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇\n\n");
printf("\t\t◎ 1.统计同年出生的人数 \t\t\n\n");
printf("\t\t◎ 2.统计同月出生的人数 \t\t\n\n");
printf("\t\t◎ 3.统计同月同日出生的人数\t\t\n\n");
printf("\t\t◎ 4.统计同年同月同日出生的人数\t\t\n\n");
printf("\t\t*按0返回\t\t\n\n");
printf("\t\t ◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇\t\n");
}
void ID_Birth_Number_Count(IdentityInfor *head,int language)
{
int select;
char BirthdayYear[40],BirthdayMonth[40],BirthdayDay[40];
do{
system("cls");
if(language)
{ Secondary_Option_Menu_English();
printf("●Input your order:\n");
}
else
{
Secondary_Option_Menu_Chinese();
printf("●请输入选项:\n");
}
scanf("%d",&select);//Choice
switch(select)
{
case 0:
system("cls");
break;
case 1:
printf("请输入年份:\n");
scanf("%s",BirthdayYear);
ID_BirthdayYear_Count(head,BirthdayYear,language);
; break;
case 2:
printf("请输入月份:\n");
scanf("%s",BirthdayMonth);
ID_BirthdayMonth_Count(head,BirthdayMonth,language);
break;
case 3:
printf("请输入月份和日期:\n");
scanf("%s%s",BirthdayMonth,BirthdayDay);
ID_BirthdayMonth&Day_Count(head,BirthdayMonth,BirthdayDay,language);
break;
case 4:
printf("请输入年份、月份和日期:\n");
scanf("%s%s%s",BirthdayMonth,BirthdayDay);
ID_BirthdayYear&Month&Day_Count(head,BirthdayYear,BirthdayMonth,BirthdayDay,langu age);
break;
default:
if(language)
printf("●Error,Please input again!\n");
else
printf("●错误,请重新输入!:\n");
break;
}
}while(select);
}。