. v2
``` public class LoopTest { public static void main(String[] args) { for (int i = 0; i < 100; i++) { System.out.println("i = " + Integer.toString(i)); } } } ``` Try this.
Nice lol
Are you doing this as well @tanya123
public class LoopTest { public static void main(String[] args) { for (int i = 0; i < 100; i++) { if (i % 3 == 0) { System.out.println(Integer.toString(i) + " is divisible by 3"); } else { System.out.println(Integer.toString(i) + " is not divisible by 3"); } } } }
Nope, I couldn't open it...
lol That's neat @wio
Do you know what % is?
Other than percent, I don't think so lol.
``` public class LoopTest { public static void main(String[] args) { for (int i = 0; i < 100; i++) { System.out.println(Integer.toString(i) + " % 3 is " + Integer.toString(i % 3)); } } } ```
@wio why not just: ``` public class LoopTest { public static void main(String[] args) { for (int i = 0; i < 100; i++) { System.out.println("i = " + i); } } }
Join our real-time social learning platform and learn together with your friends!