How to resolve the algorithm Loops/For with a specified step step by step in the BASIC programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Loops/For with a specified step step by step in the BASIC programming language
Table of Contents
Problem Statement
Demonstrate a for-loop where the step-value is greater than one.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Loops/For with a specified step step by step in the BASIC programming language
Source code in the basic programming language
FOR I = 2 TO 8 STEP 2 : PRINT I; ", "; : NEXT I : PRINT "WHO DO WE APPRECIATE?"
FOR i = 1 TO 10 STEP 2
PRINT i
NEXT
for i = 2 to 8 step 2
print i; ", ";
next i
print "who do we appreciate?"
for i = 1 to 21 step 2
print i; " ";
next i
end
FOR n = 2 TO 8 STEP 1.5
PRINT n
NEXT
10 for i = 1 to 21 step 2
20 print i;
30 next i
10 FOR I = 1 TO 10 STEP 2
20 PRINT I
30 NEXT
You may also check:How to resolve the algorithm Almost prime step by step in the Pascal programming language
You may also check:How to resolve the algorithm Vector step by step in the Action! programming language
You may also check:How to resolve the algorithm User input/Text step by step in the Icon and Unicon programming language
You may also check:How to resolve the algorithm Möbius function step by step in the Quackery programming language
You may also check:How to resolve the algorithm Reduced row echelon form step by step in the XPL0 programming language