1、 /在停车场停留的天数,float money; /费用定义char car; /对汽车类型进行字符定义char f; /对“:”进行字符定义void mytime() printf(请输入汽车进入停车场时间(H:M):); scanf_s(%d%c%d,&rh,&f,1,&rm); switch(f) case: if(0=rh&rh=24) if(0=rm&rm=60) printf(请输入汽车离开停车场时间(H: scanf_s(ch,&cm); switch(f) case if(0=ch&ch if(0=cm&cm printf(请输入在停车场停留的天数(过24:00为一天): sc
2、anf(%dday); void mymoney()nnnnnn停车场收费清单nnn汽车类型:%cnn,car);入场时间:%02d%c%02dnn,rh,f,rm);离开时间:,ch,f,cm);停车时间:,th,f,tm);停车费用:%.2f元nn,money); getch();void main()请输入汽车类型(轿车C,客车B,卡车T):%ccar,1); switch(car)C mytime(); if(tm!=0)|(th!=0)=tm&tm=10)=th&th=3) money = th*50; mymoney(); else money = (th-3)*51.5+3*50; else if(0 = th&th 3) money = (th+1)*50; money = (th-2)*51.5+3*50; ;break;B= 1) money = th*52; money = (th-1)*52.7+52; 1) money = (th+1)*52; money = th*52.7+1*52; T= 2) money = th*51; money = (th-2)*52.3+2*51; 2) money = (th+1)*51; money = (th-1)*52.3+2*51; default:printf(汽车类型输入错误,请重新输入:n getch();