Computer Science, asked by amritabhattach62, 1 month ago

1) Write a Qbasic program to take the marks of any three subjects as input and find out total and percentage.​

2) Write a Qbasic program to take the length and breadth of a rectangle from the user as input and find the area and perimeter of the rectangle.

PLZ ANSWER FAST

Answers

Answered by anindyaadhikari13
7

\texttt{\textsf{\large{\underline{Solution}:}}}

Answer to question 1.

CLS

INPUT "Enter the marks in first subject: "; A

INPUT "Enter the marks in second subject: "; B

INPUT "Enter the marks in third subject: "; C

SUM = A + B + C

PERCENTAGE = SUM / 3

PRINT "Total Marks you got: "; SUM

PRINT "Percentage: "; PERCENTAGE

END

Answer to question 2.

CLS  

INPUT "Enter side of the square: "; A  

PERIMETER = 4 * A  

AREA = A ^ 2  

PRINT "Perimeter of the square is: "; PERIMETER  

PRINT "Area of the square is: "; AREA  

END

See the attachment for output.

Attachments:
Similar questions
Math, 8 months ago