Spaces:
Running
Running
TurkuBasicOOPinJava
/
Week 1: Types, condition clauses and loops
/13b. Print the numbers 1...16 every third number
| Arrange the lines of the program in such an order that the program prints the numbers 1...16 below in three steps. | |
| public static void main(String[] args){ | |
| int num; | |
| num = 1; | |
| while (num < 18){ | |
| System.out.println(num); | |
| num = num + 3; | |
| } | |
| } | |