English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

write a basic program to receive customer type, then ask for the prices of 3 items to finally calculate the tax. the details are:
customer type 1 tax 3 % of item price
customer type 2 tax 7 % of item price
customer type 3 tax....10% ..
customer type 4 tax 15%...
sum of price,tax, and total amount to be paid must be displayed..
help me pleaseeeeeeeeeeeeee

2007-02-12 20:59:52 · 1 answers · asked by Anonymous in Computers & Internet Programming & Design

1 answers

Some of this problem will require you to design a form. You can use option(radio) buttons, or a textbox for the input of a customer type (number 1 to 4)

after that write a subroutine which accepts an integer (1 to 4) as a customer type and use a select case function to determine the taxrate based upon the customer type entered.


Private Sub myCalculation (cust as integer)

DIM taxrate as double
DIM total as double
DIM tax as double
DIM grandTotal as double


Secect Case cust
case 1
taxrate = .03
case 2
taxrate = .07
case 3

end select


Next get three prices from the user. You can use a For/Next to loop three times . Each time through the loop display an input box to the user asking for a price.

Tootalize the input price

total = total + price

after completing the loop compute the information

tax = total * taxrate
grandtotal = total + tax

then display your results

2007-02-13 09:26:27 · answer #1 · answered by MarkG 7 · 0 0

fedest.com, questions and answers