Computer Science, asked by gouravjalan827, 4 hours ago

WAP to store a number. Now display cube of the number if its positive otherwise display its square qbasic pls send answers only ​

Answers

Answered by cute71367
2

Question:-

WAP in QBASIC to print square and cube of number from 5 to 10

Program:-

CLS

PRINT "Squares of numbers between 5-10 are as follows.."

FOR I=5 TO 10 STEP 1

A=I*I

PRINT A+" "

NEXT I

PRINT "Cubes of numbers between 5-10 are as follows.."

FOR I=5 TO 10 STEP 1

A=I*I*I

PRINT A+" "

NEXT I

Similar questions