SET TALK OFF INPUT"请输入重量:" TO A DO CASE CASE A<=100 B=0.05*A ?"邮件重量为:",A,"克" ?"应收邮费:",B,"元" CASE A>100 Y=A-100 Z=100*0.05 S=Y*0.02 B=Z+S ?"邮件重量为:",A,"克" ?"应收邮费:",B,"元" ENDCASE SET TALK ON RETURN
SET TALK OFF INPUT"请输入重量:" TO A IF A<100 B=A*0.5 ?"你的邮件重量为:",A,"克" ?"你的邮费为:",B,"元" else B=A*0.5 C=C*0.02 S=B+A ?"你的邮件重量为:",A,"克" ?"你的邮费为:",S,"元" ENDIF SET TALK ON