TurkuBasicOOPinJava / Week 1: Types, condition clauses and loops /13b. Print the numbers 1...16 every third number
KaiquanMah's picture
Create 13b. Print the numbers 1...16 every third number
cd839d2 verified
raw
history blame
260 Bytes
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;
}
}