KnowledgeBoat Logo
|

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.

QBASIC

QBASIC: Input Statement

43 Likes

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
End

Output

Enter the total strength of the class ? 50
Number of students who failed in both the subjects = 25

Answered By

19 Likes


Related Questions