' qbasic.net/en/qbasic-tutorials/beginner/qbasic-beginner-2.htm
CLS
INPUT "Enter the radius of a circle in the origin "; rad
INPUT "Enter the coordinates of a point "; px, py
diff = px * px - rad * rad + py * py
IF diff < 0 THEN
PRINT "Yes, it lies within the circle"
ELSE
PRINT "No, it doesn't lie within the circle"
END IF
Comments
Leave a comment