WAP to store a number. Now display cube of the number if its positive otherwise display its square qbasic
Answers
Answered by
2
You can use the following program written in QBASIC:::---
CLS
INPUT "Enter the number: ",lol
IF lol > 0 THEN
PRINT lol * lol * lol
ELSE
PRINT lol * lol
END IF
END
This will ask you to input a number, if it is positive, it will print its cube, and if not, then it will print square.
Similar questions