Write QBASIC programs for the following questions given in the Attachment.
Attachments:
Answers
Answered by
0
A program to find the area and circumference of a circle (Qbasic)
CLS
LET pie = 3.14
INPUT "Enter radius of circle"; r
a = pie * r ^ 2
c = 2 * pie * r
PRINT "The area of the circle is"; a
PRINT "The circumference of the circle is"; c
END
CLS
INPUT “Enter the radius of the circle” ;r
Pi=22/7
A=Pi*r*r
PRINT “The area of the circle is”;A
END
CLS
LET pie = 3.14
INPUT "Enter radius of circle"; r
a = pie * r ^ 2
c = 2 * pie * r
PRINT "The area of the circle is"; a
PRINT "The circumference of the circle is"; c
END
CLS
INPUT “Enter the radius of the circle” ;r
Pi=22/7
A=Pi*r*r
PRINT “The area of the circle is”;A
END
Attachments:
Answered by
0
ans e)
CLS
INPUT"ENTER THE VALUE OF L:";L
V=L+L+L
PRINT "VOLUME OF CUBE=";L
END
ANS f)
CLS
INPUT "ENTER THE RADIUS ";R
A= 3.14*R*R
PRINT"AREA OF THE CIRCLE=";A
END
ANS g)
CLS
INPUT "ENTER THE RADIUS ";R
P=2*3.14*R
PRINT "PERIMETER OF THE CIRCLE=";P
END
AND h)
CLS
INPUT "ENTER 1ST NUMBER";A
INPUT " ENTER 2ND NUMBER";B
SUM=A+B
PRINT "SUM OF TWO NUMBERS";SUM
END
AND i)
CLS
INPUT "ENTER 1ST NUMBER";A
INPUT " ENTER 2ND NUMBER";B
P=A*B
PRINT "PRODUCT OF TWO NUMBERS";P
END
ANS j)
CLS
INPUT "ENTER 1ST NUMBER";A
INPUT " ENTER 2ND NUMBER";B
D=A-B
PRINT "DIFFERENCE OF TWO NUMBERS";D
END
Similar questions