Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
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
Please
log in
to post a comment.
Chiper
twelveDays
exp 1
Problem_fib
JAVA # 20 RASTGELE SAYIDAN EN BÜYÜĞÜNÜ BULMAK
hello_world_test
sfr
jb7.0 extends.override
JDBC with lambda
3.c
Please log in to post a comment.