Computer Science, asked by akshra062009, 25 days ago

Write a Qbasic program to input side of a square and print area of the square.​

Answers

Answered by anindyaadhikari13
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:

  1. Line 10: Clears the screen.
  2. Line 20: Ask the user to enter the side of the square.
  3. Line 30: Calculates the area using formula.
  4. Line 40: Displays the area of the square.
  5. Line 50: End of program.

See the attachment for output.

Attachments:
Similar questions