Harry Potter
Enviado por retroo • 19 de Febrero de 2013 • 5.282 Palabras (22 Páginas) • 343 Visitas
QUESTION # 1:
Tax of 15% is added to price of an item. Input the name of an item and the price. Print the name of the item, the amount of tax and the new price after tax is added.
SOLUTION # 1:
PRINT “Enter the name and price of an item” READ NAME, PRICE TAX = PRICE * 15%/100 NEW PRICE = PRICE + TAX PRINT “Name”, NAME PRINT “Tax”, TAX
QUESTION # 2:
Fees are charged to attend the cinema as follows. Balcony - $8.00, House - $7.00. Input the number of persons sitting in the balcony and the number sitting in the house. Calculate and print the total revenue collected.
Solution #2:
PRINT “Enter the number of persons sitting in a balcony and in a house” READ NUMBER IN BALCONY, NUMBER IN HOUSE BALCONY REVENUE = NUMBER IN BALCONY * $8.00 HOUSE REVENUE = NUMBER IN HOUSE * $7.00 TOTAL REVENUE = BALCONY REVENUE + HOUSE REVENUE PRINT “Total revenue”, TOTAL RVENUE
QUESTION # 3:
A deduction of $20.00 is taken from the salary of an employee if the salary is less than $300.00 and a deduction of $30.00 if salary is greater than $300.00. Input the salary less the appropriate deduction.
Solution #3:
PRINT “Enter the salary” READ SALARY IF SALARY < $300.00 THEN NEW SALARY = SALARY - $20.00 ELSE
...