完了
pascal吧
全部回复
仅看楼主
level 1
笑猫2013 楼主
program pcase1;
var
oil,help:char;
kg,total:real;
begin
write(*Enter the amount in kilograms(kg):*); readln(kg);
write(*Which type of the gasoline(a,b,c):*); readln(oil);
wirte(*Which type for service(f,m,e):*); readln(help);
case oil of
*a*: total:=1.50*kg;
*b*: total:=1.35*kg;
*c*: total:=1.18*kg;
else writeln(*Input Error!*)
end;
{——————处理汽油的类型}
case help of
*f*:;
*m*: total:=total*(1-0.05);
*e*: total:=total*(1-0.10);
else writeln(*Input Error!*)
end;
{——————处理服务类型}
writeln;
writeln(*Total is *,total:10:2);
end.
2014年10月02日 01点10分 1
level 15
←_←
2014年10月02日 03点10分 2
level 12

←_←
2014年10月02日 03点10分 3
1