Computer Science, asked by lkjhv6996, 8 months ago

Write a Qbasic program to input a number to find its square root

Answers

Answered by ishikavs
0

Program to find the square root:

CLS

INPUT “ENTER A NUMBER = ”; N

S = N ^ (1 / 2)

PRINT “SQUARE ROOT OF NUMBER IS ”; S

END

Answered by mad210219
0

Qbasic program to input a number to find its square root

Explanation:

CLS

INPUT “ENTER A NUMBER = ”; ip

S = ip ^ (1 / 2)

PRINT “SQUARE ROOT OF NUMBER IS ”; S

END

Here  

In Qbasic

As usual the strings are surrounded with quotes

Every time we write a rogram we have to  initiate CLS first

Next ,

We take input using  

INPUT method

And we print the square root using PRINT method

To find square root we  

Calculate input power half

As it indicates square root .

Similar questions