Skip to content

Instantly share code, notes, and snippets.

@libnumafly
Created April 20, 2017 11:05
Show Gist options
  • Save libnumafly/f35ababf3547f5b4afbd66c2b4e1e667 to your computer and use it in GitHub Desktop.
Save libnumafly/f35ababf3547f5b4afbd66c2b4e1e667 to your computer and use it in GitHub Desktop.
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