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
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
Math,
2 hours ago
Computer Science,
4 hours ago
Physics,
4 hours ago
Social Sciences,
7 months ago
Physics,
7 months ago
Math,
7 months ago