To input radius of a circle and allows user to choose to find the area or perimeter of the circle. (Qbasic Code)
INPUT "Enter the radius of the circle"; r
PRINT "To find the area, Press 1"
PRINT "To find the perimeter, Press 2"
INPUT "Which do you want to find"; ch
pi = 3.14
IF ch = 1 THEN
a = pi * r ^ 2
PRINT "Area of the circle is"; a
ELSEIF ch = 2 THEN
p = 2 * pi * r
PRINT "Perimeter of the circle is"; p
PRINT "Selection Wrong";