Write a Qbasic program to input side of a square and print area of the square.
Answers
Answered by
1
Answer:
This is the required QBASIC program for the question.
10 CLS
20 INPUT "Enter the side of the square: ";S
30 A=S*S
40 PRINT "Area of the square is: ";A
50 END
Explanation:
- Line 10: Clears the screen.
- Line 20: Ask the user to enter the side of the square.
- Line 30: Calculates the area using formula.
- Line 40: Displays the area of the square.
- Line 50: End of program.
See the attachment for output.
Attachments:
Similar questions
English,
2 months ago
Math,
2 months ago
Environmental Sciences,
2 months ago
Social Sciences,
4 months ago
Math,
10 months ago
Math,
10 months ago
English,
10 months ago