Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Problem_OnOff
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { for (int i=1; i < 100; i++){ if (i%3 == 0 && i%5 == 0) System.out.print(" OnOff"); else if (i%3==0) System.out.print(" On"); else if (i%5==0) System.out.print(" Off"); else System.out.print(" "+i); } } }
run
|
edit
|
history
|
help
0
ElaineBrown**
NumberBasedAlphabetsPrint
Problem: rstring
Switch
1.5
Java programs
Eckhart generator with real id
RevArray
names
Charles Chung