import java util Scanner public class Task20 public static void main S

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import java.util.Scanner;
public class Task20 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
for (int i = 1; i <= n + 1; i++) {
for (int j = 1; j <= 2 * n + 1; j++) {
if (j <= n + 1 - i || j > n + i) {
System.out.print("*");
} else {
System.out.print("0");
}
}
System.out.println();
}
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= 2 * n + 1; j++) {
if (j <= i || j > 2 * n + 1 - i) {
System.out.print("*");
} else {
System.out.print("0");
}
}
System.out.println();
}
}
}