Computer Science, asked by pinaki2, 1 year ago

write a program in q basic to find square root and cube root of a number

Answers

Answered by Programme
8
The program the you have to write in QBASIC is 

To display square of the input number

REM PROGRAM TO DISPLAY SQUARE OF AN INPUT NUMBERCLSINPUT “ENTER ANY NUMBER”; NS = N ^ 2PRINT “SQUARE OF NUMBER ”; SEND
USING SUB PROCEDURE
DECLARE SUB SQUARE (N)CLSINPUT “ENTER ANY NUMBER”; NCALL SQUARE(N)END
SUB SQUARE (N)S = N ^ 2PRINT “SQUARE OF NUMBER “; SEND SUB
USING FUNCTION PROCEDURE
DECLARE FUNCTION SQUARE (N)CLSINPUT “ENTER ANY NUMBER”; NS = SQUARE(N)PRINT “SQUARE OF NUMBER “; SEND
FUNCTION SQUARE (N)SQ= N ^ 2SQUARE = SQEND FUNCTION
Answered by Rebecca118
5
square root is:

Print "SQR (x)"; SQR (x)

where x is the number you want

sorry bro cube root I don't know

Similar questions
Math, 7 months ago