Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
patterns
/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Rextester { public static void main (String[] args) throws java.lang.Exception { int i=0, j=0; for(i=1;i<=5;i++){ for(j=0;j<i;j++){ System.out.print("* "); } System.out.println(); } System.out.println(); for (i=1;i<=5;i++){ for(j=0;j<5-i;j++){ System.out.print(" "); } for(j=0;j<i;j++){ System.out.print("* "); } System.out.println(); } System.out.println(); for(i=5;i>=1;i--){ for(j=0;j<i;j++){ System.out.print("* "); } System.out.println(); } System.out.println(); for (i=5;i>=1;i--){ for(j=0;j<5-i;j++){ System.out.print(" "); } for(j=0;j<i;j++){ System.out.print("* "); } System.out.println(); } System.out.println(); for(i=1;i<=5;i++){ for(j=0;j<5-i;j++){ System.out.print(" "); } for(j=0;j<i+i-1;j++){ System.out.print("* "); } System.out.println(); } System.out.println(); for(i=1;i<=5;i++){ for(j=0;j<5-i;j++){ System.out.print(" "); } for(j=0;j<i+i-1;j++){ System.out.print("* "); } System.out.println(); } for(i=4;i>0;i--){ for(j=0;j<5-i;j++){ System.out.print(" "); } for(j=0;j<i+i-1;j++){ System.out.print("* "); } System.out.println(); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
single_digit
Display Page (Pagination)
Basic Matrix
pattern2
Java programs
Java # Bir Cumlenin uzunluğu
1.5
Prime Numbers
vampires number Eckel B. Thinking in Java
Sorting array
Please log in to post a comment.