运费问题:
s:路程
w:重量
p:单价
t:总价
已知对于不同的S、W可以适当打折,求总价。
这是我的程序:
var s,w,p,t:real;
begin
assign(input,'06-01.in');
reset(input);
assign(output,'06-01.out');
rewrite(output);
readln(s,w,p);
if s>=300
then
begin
if w=2) and (w=4) and (w=6
then t:=s*w*p*0.92;
end;
if s=2) and (w=4) and (w=6
then t:=s*w*p*0.94;
end;
writeln(t:0:2);
end.
编译可以通过,但是out文件内没有结果。哪里错了???????????
|