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
Chemistry,
1 month ago
English,
1 month ago
Computer Science,
2 months ago
Physics,
2 months ago
Social Sciences,
9 months ago
Physics,
9 months ago
Math,
9 months ago