Computer Studies
There are 28 boys and 22 girls in your class. Write a program in QBASIC to find the percentage of boys and girls in the class.
QBASIC
QBASIC: Cmds & Stmts
113 Likes
Answer
Cls
Let B = 28
Let G = 22
Let T = B + G
Let PERB = B / T * 100
Let PERG = G / T * 100
Print "PERCENTAGE OF BOYS= "; PERB
Print "PERCENTAGE OF GIRLS= "; PERG
EndOutput
PERCENTAGE OF BOYS= 56
PERCENTAGE OF GIRLS= 44
Answered By
64 Likes
Related Questions
Distinguish between Program Screen and Output Screen
Write a program in QBASIC to greet your friend on the occasion of New Year by using PRINT statement. The output of the program is shown as:
Season's Greeting Best Wishes for A Happy and Prosperous New Year From: Name:The base and height of a triangle are 15 cm and 10 cm respectively. Write a program in QBASIC to calculate the area of the triangle.
(Hint: Area of a triangle = 1 / 2 * base * height)A salesman sold 14 chairs at the rate of ₹ 275 each and 3 tables at the rate of ₹ 650 each. Write a program in QBASIC to calculate the total sale.