KnowledgeBoat Logo
|

Computer Studies

You purchased a Computer textbook and an Oxford dictionary. The shopkeeper allows 10% discount on the textbook and 20% discount on the dictionary. Write a program in QBASIC format to calculate the total discount and the amount to be paid to the shopkeeper, taking price of the books as input.

QBASIC

QBASIC: Input Statement

79 Likes

Answer

Cls
Input "Enter price of Computer book "; cb
Input "Enter price of dictionary "; d
Let d1 = 10 / 100 * cb
Let d2 = 20 / 100 * d
Let discount = d1 + d2
Print "Total discount = Rs. "; discount
Let cost = cb + d - discount
Print "Amount to be paid = Rs. "; cost
End

Output

Enter price of Computer book ? 500
Enter price of dictionary ? 1000
Total discount = Rs. 250
Amount to be paid = Rs. 1250

Answered By

38 Likes


Related Questions