program compvar; uses crt; {-------------------------------------------------------------------------- program description by This program will ask the user for a bill amount and the tax rate, then compute the tax & total amount. --------------------------------------------------------------------------} VAR bill:real; tax:real; total:real; name:string; taxrate:real; begin clrscr; {----------INPUT SECTION-------------------------------------} write ('Hello, what''s your name? ---> ') ; readln (name); writeln; writeln ('So, ',name,', what is the current tax rate, writen in percent form but without') ; write ('the percent sign? ---> '); readln (taxrate) ; writeln; write ('What is the amount of your bill, not including the dollar sign? ---> ') ; readln (bill); {------------------------------------------------} writeln; writeln; taxrate := taxrate / 100 ; tax := bill * taxrate ; total := tax + bill ; writeln ('---------------------------------') ; writeln; writeln ('YOUR BILL IS $',bill:0:2); writeln; writeln; writeln ('YOUR TAX IS $',tax:0:2) ; writeln; writeln ('=================================') ; writeln; writeln ('YOUR TOTAL IS $',total:0:2) ; writeln; writeln ('---------------------------------') ; readln; end.