Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
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
String reverse
Inheritance
Решето Эратосфена
class and name
Javaprog.java
pow binary
pk2
Weird float operation!
Invert sign and add
jb14.0 tests