write a program in QBasic to generate the series 8 27 64 125 216
Answers
Answered by
5
Solution :
Check the for loop cmd in QBasic set c from 2 to 6, function is c^3 and c =c+1 is the parameter.
Input :
CLS
FOR c = 2 to 6
PRINT c^3
NEXT c
END
Output :
8
27
64
125
216
______________________________________________________
Additional Information :
Syntax of a for loop -
FOR
= start TO end
(Statement)
NEXT
______________________________________________________
Similar questions
Business Studies,
4 months ago
Math,
4 months ago
English,
8 months ago
Science,
8 months ago
World Languages,
1 year ago