I have been into Qbasic for a long time.. And Am here to help the beginners How to calculate the area of a circle Using Qbasic... So follow the step below and do it yourself.....
CLS
COLOR 4
DIM pie AS SINGLE
DIM radius AS INTEGER
LET pie = 3.1423
INPUT "enter radius of a circle"; r
a = pie * r ^ 2
c = 2 * pie * r
PRINT "the area of a circle is"; a
PRINT "the circumference of the circle is"; c
when you are done with the coding Run the program Using F5 Or Ctrl F5... To see your out put...
CLS
COLOR 4
DIM pie AS SINGLE
DIM radius AS INTEGER
LET pie = 3.1423
INPUT "enter radius of a circle"; r
a = pie * r ^ 2
c = 2 * pie * r
PRINT "the area of a circle is"; a
PRINT "the circumference of the circle is"; c
when you are done with the coding Run the program Using F5 Or Ctrl F5... To see your out put...

0 comments: