Computer Studies
The rate of petrol is ₹ 47.60 per litre. You paid ₹ 250 to the pump attendant and asked for 5 litres of petrol to be filled in the tank. Write a program in QBASIC to calculate the cost of petrol and the amount of money refunded.
QBASIC
QBASIC: Cmds & Stmts
57 Likes
Answer
Cls
Let RATE = 47.6
Let COST = 5 * RATE
Let PAID = 250
Let REFUND = PAID - COST
Print "MONEY REFUNDED = Rs. "; REFUND
ENDOutput
MONEY REFUNDED = Rs. 12
Answered By
30 Likes
Related Questions
Write a program in QBASIC to find the value of the given expressions when a = 10, b = 5, c = 2.
- a2 +b3 +c4
- (a + b)2
- a2 + b2
- (a - b + c)2
In a class of 60 students, 90% are present. Write a program in QBASIC to calculate the number of students present and absent.
In a book fair, you purchased the following books:
Harry Potter Books : ₹ 950
English Dictionary : ₹ 1200
Encyclopedia : ₹ 1600You gave an amount of ₹ 4000 to the shopkeeper. Write a program in QBASIC to calculate the total amount to be paid to the shopkeeper and the money refunded by him.
'LEXPO' announces 25% discount on all leather items. You purchased a leather bag that costs ₹ 660 and a belt priced ₹ 160. Write a program in QBASIC to calculate the amount to be paid to the shopkeeper.