Wednesday 30 October 2019

Qbasic to find circumference of circle using Sub

DECLARE SUB CIR ( R )
CLS
INPUT "Enter radius"; R
CALL CIR ( R )
END

SUB CIR ( R )
C =  2 * 22 / 7 * R
PRINT "Circumference of circle = "; C
END SUB

No comments:

Post a Comment