class Text3 {
public static void main(String[] args) {
int n = 15;
for (int i = 1;i<=(2*n-1)/4;i++) {
for (int j = 1;j<=n/2-i+1;j++) {
System.out.print(" ");
}
for (int j = 1;j<=i;j++) {
System.out.print((char)3);
System.out.print(" ");
}
for (int j = 1;j<=2*(n/2-i+1)-2;j++) {
System.out.print(" ");
}
for (int j = 1;j<=i;j++) {
System.out.print((char)3);
System.out.print(" ");
}
for (int j = 1;j<=n-2*i;j++) {
System.out.print(" ");
}
System.out.println();
}
for (int i = 1;i<=n;i++) {
for (int j = 1;j<=(i-1) ;j++ ) {
System.out.print(" ");
}
for (int k = 1;k<=n-i+1;k++) {
System.out.print((char)3);
System.out.print(" ");
}
System.out.println();
}
}
}
|
|