Computer Science, asked by OmSurya, 4 months ago

Write a program input a number and print it’s squares and square root in qbasic

FAST !!​

Answers

Answered by anindyaadhikari13
0

Answer:

The given program is written in QBASIC.

CLS

INPUT "Enter a number: "; A

PRINT "Square: "; A ^ 2

PRINT "Square root: "; A ^ (1 / 2)

END

Algorithm:

  • Accept the number, say A.
  • Display the value A ^ 2.
  • Display the value of A ^ (1/2).

Note: We can also use SQR() function to calculate square root.

Refer to the attachment for output.

•••♪

Attachments:
Similar questions