0% found this document useful (0 votes)
48 views1 page

Programming Exercises (5 10)

The document describes two programming exercises. The first asks the user to create a program that calculates a customer's bill for various electronics by prompting the user for quantities and calculating subtotals, tax, and total. The second asks the user to create a program that prompts for a number between 0-32,767 and prints each digit on a new line with three spaces between digits.

Uploaded by

Diego Abad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views1 page

Programming Exercises (5 10)

The document describes two programming exercises. The first asks the user to create a program that calculates a customer's bill for various electronics by prompting the user for quantities and calculating subtotals, tax, and total. The second asks the user to create a program that prompts for a number between 0-32,767 and prints each digit on a new line with three spaces between digits.

Uploaded by

Diego Abad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 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