Computer Science, asked by siddhichoudhary78, 4 months ago

REM To print the first 15 numbers.

FOR × = _____

PRINT _____

NEXT ×

END complete the sentence​

Answers

Answered by anindyaadhikari13
1

Answer:

To print first 15 natural numbers, write the códe given below,

FOR X = 1 TO 15

PRINT X;

NEXT X

Explanation:

Syntax of for loop goes like :

FOR VARIABLE_NAME = INITIAL_VALUE TO FINAL_VALUE STEP X

STATEMENTS. . . . .

..

..

NEXT VARIABLE_NAME

So, to print first 15 natural numbers, we have to assign VARIABLE_NAME = X (given), INITIAL_VALUE = 1 and FINAL_VALUE = 15. STEP_VALUE must be 1 as it will print all the numbers. Inside the for loop, we will display the value of the control variable.

Similar questions
English, 4 months ago