Computer Studies
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.
Answer
Cls
Input "Enter the total strength of the class "; onroll
Let e = 20 / 100 * onroll
Let m = 30 / 100 * onroll
Let total = e + m
Print "Number of students who failed in both the subjects ="; total
EndOutput
Enter the total strength of the class ? 50
Number of students who failed in both the subjects = 25
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.
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
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.