Created
April 20, 2017 11:05
-
-
Save libnumafly/f35ababf3547f5b4afbd66c2b4e1e667 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test; | |
public class ASTERLISKPIRAMID { | |
private static int a; | |
private static int b; | |
private static String AA; | |
public static void main(String[] args) { | |
/* | |
┏━━━━━━━━━━━━━━━━━━━━━━━━━┓ | |
┃ * ┃ | |
┃ *** ┃ | |
┃ ***** JUST DO IT. ┃ | |
┃ ******* EGIPTAN PIRAMID. ┃ | |
┃ ********* ┃ | |
┃ *********** ┃ | |
┗━━━━━━━━━━━━━━━━━━━━━━━━━┛ | |
*/ | |
AA = ""; | |
String mark = "*"; | |
int startPosition = 10; | |
int startNum = 1; | |
for (int aaa = 0; aaa<=11; aaa+=1){ | |
for(a = startPosition; a>=0; a--){ | |
AA += " "; | |
} | |
startPosition += -1; | |
for(b=startNum-1; b>=0; b--){ | |
AA += mark; | |
} | |
startNum += 2; | |
AA += "\n"; | |
} | |
System.out.println(AA+"\n\n THIS IS\nEGIPTAN PIRAMID."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment