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
EndOutput
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
Write a program in QBASIC to find the value of the given expressions after taking a suitable value of a and b from the console:
- a2+b 2
- (a+b) / ab
You want to calculate the total runs made by Sachin Tendulkar only in terms of centuries and half-centuries in test matches. Write a program in the QBASIC format taking the numbers of centuries and half-centuries as input. Display the total runs made by Sachin in centuries and half-centuries separately.
In an examination, 20% students failed in English and 30% failed in Maths. Write a program in QBASIC format to find the total number of students who failed in both the subjects taking the total number of students in the class as input.
Write a program in QBASIC format to find the value of 's' in the given equation, taking the suitable value of 'u' , 'v' and 'a' as input.
s = (v2 - u2) / 2a