}
switch(ch) { case'Y': case'y':
printf(\停车收费总计为%2lf元\\n\ break; case'N': case'n': break; }} main() {
int choice; double total=0;
struct Garage gar[2][6]; Init(gar); while(1)
{ Instruction();
printf(\请输入要进行的操作:\ scanf(\ while(choice<0||choice>3) {
printf(\输入的不合法,请输入0-3选择:\ scanf(\ }
switch(choice) {
case 1:
Park(gar); break; case 2:
total+=Leave(gar); IsPrintTotal(total); break; case 3:
Information(gar); break; case 0: break; }} return 0; }
四 程序运行测试:
第 10 页
打开程序进入键盘式界面菜单,选择您所需要进行的操作选项。
此车为可停车
收费
第 11 页