/* 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 Ideone
{
{
render();
}
private static final char fillChar = '*';
private static final int BaseLength = 64;
public static void render(){
int i;
// puncak
for(i = 2; i <= 6; i+=2){
centerize(i);
}
// bawah puncak
for(i = 24; i >= 20; i-=2){
centerize(i);
}
// tiang
for(i = 0; i < 24; i++){
centerize(6);
}
// dasar tiang
for(i = 62; i >= 26; i -= 6){
centerize(i);
}
// dasar tiang dengan bolongan tengah
for(i = 16; i >= 10; i -= 6){
centerize(BaseLength, i, 4);
}
// pondasi bawah
for(i = 62; i <= 64; i +=2 ){
centerize(i);
}
}
public static void centerize(int fill){
centerize(BaseLength, fill, 0);
}
public static void centerize(int length, int fill, int centerspace){
int fillLen = fill + centerspace;
int paddLen = (length - fillLen) / 2;
String padd
= (paddLen
== 0) ? "" : String.
format("%" + paddLen
+ "s",
" "); if(centerspace == 0) {
print
= String.
format("%" + fill
+ "s", fillChar
).
replace(' ', fillChar
); } else {
fillLen -= centerspace;
String centerFill
= String.
format("%" + centerspace
+ "s",
" "); print
= String.
format("%" + (fill
/2) + "s", fillChar
).
replace(' ', fillChar
); print
= String.
format("%s%s%s", print, centerFill, print
); }
System.
out.
println(padd
+ print
+ padd
); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCXJlbmRlcigpOw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