Kotlinlearncs.online LogoJava
Return to List

Solve: Number Loop

Created By: Geoffrey Challen
/ Version: 2021.8.0

Let's write a simple loop. Assuming an int variable named count has been declared and initialized to a value larger than zero, write a loop that prints the numbers between 0 and count - 1, inclusive, one number each line. So if count is 4, you should print:

0
1
2
3

You can use any kind of loop you want! But do not modify count.

Related Lessons

Stuck? You may find these lessons helpful: