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"
End

Output

AREA OF THE TRIANGLE= 75 SQ CM

Answered By

46 Likes


Related Questions