Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
|
Privacy
pattern of the day (code formatting fixed)
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; // random anon: PLX FORMAT COD PROPER NEX TYME class Rextester{ public static void main(String args[]) { int e = 0; int n = 5; int k = n - 1; for (int i = 1; i <= (n * 2) - 1; i = i + 2) { for (int j = 1; j <= (n * 2) - 1; j++) { if (j <= k) { System.out.print(" "); } else { if (e < i) { System.out.print("* "); e++; } else { System.out.print(" "); } } } System.out.println(); k--; e = 0; } } }
run
|
edit
|
history
|
help
0
4
text
by Rupali, 1 years ago
4
by Rupali, 1 years ago
Please
log in
to post a comment.
teat2
test no.1
Hilbert Curve
Java messing around
ok
Alumnos Java con Input
Display Page
Minimo quadrato somma di cubi
Use of JS in Java (not my)
1 to 100 except 30 to40
4
by Rupali, 1 years agotext
4
by Rupali, 1 years agoPlease log in to post a comment.