#include#include "h"#include "h"#include "h"#define max 20struct magazine{char name[11];char sex[6];char addr[11];char phone_number[12];char unit_price[5];char amount[4];char time_limit[11];}order[max];void save(int n);int load_record();void search();void printf_n(int n);void printf_one(int i);void input(int i);void statistic();void add();void menu();void main(){FILE *fp;fp=fopen("xt","w");/*在C:\Documents and Settings\Administrator里建立一个"xt"记事本*/fclose(fp);menu();}void menu(){// void clrscr();int w,n;do{//clrscr();printf("\n");printf("\t\t* * * * * * * * * * * * * * * * * * * * * * * * *\n");printf("\t\t \n");printf("\t\t \n");printf("\t\t 欢迎来到杂志订阅系统! \n");printf("\t\t \n");printf("\t\t \n");printf("\t\t* * * * * * * * * * * * * * * * * * * * * * * * *\n");printf("\n\n\t\t *********************************************\n\n");printf("\t\t 1:add_new_subscriber\n");printf("\t\t 2:browse\n");printf("\t\t 3:statistic\n");printf("\t\t 4:exit\n\n");printf("\t\t *********************************************\n\n");printf(" Choice your number(1-4):[ ]\b\b");scanf("%d",&n);if(n<1||n>4) w=1;else w=0;}while (w==1);/***************选择功能****************/switch(n) { case 1:add();break; /*增加新订户记录*/ case 2:search();break; /*查找过期的订户记录并删除*/ case 3:statistic();break; /*统计*/ case 4:break; /*退出*/ }}/*********************添加模块************************/void add(){int t,i,m;system("cls");t=load_record();printf("您需要添加多少用户的信息?\n");printf("输入号码:[ ]\b\b\b");scanf("%d",&m);for(i=0;i