Computer Studies
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)
QBASIC
QBASIC: Cmds & Stmts
75 Likes
Answer
Cls
Let B = 15
Let H = 10
Let A = 1 / 2 * B * H
Print "AREA OF THE TRIANGLE= "; A; "SQ CM"
EndOutput
AREA OF THE TRIANGLE= 75 SQ CM
Answered By
46 Likes
Related Questions
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: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.
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.
Write a program in QBASIC to calculate the area and circumference of a circle of the radius 14 cm.
(Hint: Area of a circle = 22/7 * r2, Circumference = 2 * 22/7 * r)