车票管理系统毕业课程设计报告 下载本文

,records[i].from,records[i].to,records[i].\

.num);

} else { }

if(i==class_num) *i==因为上述有break,故class_num时

printf(\该班次已满或已发出!\\n\getch(); break; save(); getch(); break;

表示未找到输入班次,*

}

void Ticketdelete() {

int i; char num[10]; system(\gotoxy(8,4); printf(\退票\gotoxy(8,5); printf(\返回\gotoxy(12,8);

25 }

{ }

printf(\输入错误!\getch();

printf(\请选择(1-2):\scanf(\if(i==1) {

system(\load(); gotoxy(8,4);

printf(\请输入要退票的班次:\scanf(\i=findnum(num);

if(strcmp(num,records[i].num)==0)

if(whether(i)) { } else { }

26 gotoxy(10,20); printf(\确定(YN)?\scanf(\

if(num[0]=='y'||num[0]=='Y') { }

records[i].now--; gotoxy(10,22);

printf(\退票成功!\\n\save(); getch();

printf(\该班车已发出,无法退票!\\n\getch();

}

}

if(i==class_num) { printf(\输入错误!\getch(); }

void change() {

char num[10],s[10]; int )\

scanf(\

*若用户输入的为字符串时只需第一个字符

为Y或y即可*

}

void quit() { char s[5];

printf(\确认退出?(YN)\scanf(\

if(s[0]=='y'||s[0]=='Y')

27 }

}

if(num[0]=='y') { }

for(;i

records[i]=records[i+1];

class_num--; save(); gotoxy(4,13); printf(\删除成功!\getch();

exit(0); }

void ShowTable1() {

int i=2; system(\gotoxy(4,i++);

printf(\*\

gotoxy(4,i++); printf(\gotoxy(4,i++);

printf(\班次 | 发车时间 | 起点站 | 终点站 |行车时间|额

定载量| 已售票 |\

}

void ShowTable2(int i) { }

void find(char s1[],char s2[]) {

gotoxy(4,i+5);

printf(\

int

i,,records[i].from,records[i].to,records[i].,records[i].from,records[i].to,records[i]. i;

}

void save() {

FILE *fp1,*fp2;

if((fp1=fopen(\车票管理系统.dat\{

28