Write a loop to print 11 to 35 inclusive (this means it should include both the 11 and 35), 5 per line.
2 answers:
i = 11
while i < 36:
print(i)
i = i + 1
Hope it helps.
The idea is the following (the specific code will vary depending on the specific language):
declare a global counter, i = 11, and an inner counter, c = 0. make a for loop where i runts from 11 to 35 (inclusive) for each iteration, print i and increase c by 1. If c=5, print a return carriage (\n) and reset count to 0. For example, in Java you'd have
public class PrintNumbers{
public static void main(String []args){
int i;
int c = 0;
for (i=11; i<=35; i++){
System.out.print(i + " ");
c++;
if(c==5){System.out.print("\n"); c=0;}
}
}
}
You might be interested in
Answer:
Disable her security program and update her Java SDK before downloading Eclipse
Explanation:
Knowledge...- software QA engineer Master’s...- business analyst course...- network and computer admin training...- multimedia artist
C because you already have you sheet prepared
Answer:
algorithm
Explanation:
A(n) algorithm for a computer program is a set of steps that explains how to begin with known information specified in a problem statement and how to manipulate that information to arrive at a solution.
Answer:
Academic, Public, National & Special Library
Explanation: