Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

Programming Exercises 6 to 10

Activity #6. Write a program to create a customer’s bill for a company. The company sells only five different products: TV, VCR,
Remote Controller, CD player and Tape recorder. The unit prices are P400.00, P220.00, P35.20, P300.00 and P150.00 respectively.
The program must read the quantity of each piece of equipment purchased from the keyboard. It then calculates the cost of each item,
the subtotal, and the cost after an 8.25% sales tax.

Output:
How many TVs were sold? 3
How many VCRs wer sold? 5
How many Remote Controller were sold? 1
How many CDs were sold? 2
Hw many Tape recorders were sold? 4

QTY DESCRIPTION UNIT PRICE TOTAL PRICE


------- ------------------- ----------------- --------------------
xx TV 400.00 xxxx.xx
xx VCR 220.00 xxxx.xx
xx Remote Control 35.20 xxxx.xx
xx CD player 300.00 xxxx.xx
xx Tape ecoder 150.00 xxxx.xx
--------------------
Subtotal xxxxx.xx
Tax xxxxx.xx
Total xxxxx.xx

Activity # 7. Write a pogram that promts the user for an integer value range 0 to 32, 767 and then pints the individual digit of the
numbers on a line with three spaces between the digits.

Output:

Enter a number from 0 to 32, 767 : 1234

0 1 2 3 4
1 2 3 4
2 3 4
3 4
4

You might also like