Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- /**
- * Created by ValioHP on 26.2.2017 г..
- */
- public class fox {
- public static void main(String[] args) {
- Scanner console = new Scanner(System.in);
- int n = Integer.parseInt(console.nextLine());
- for (int i = 0; i < n; i++) {
- System.out.print(repeat("*", i+1));
- System.out.print("\\" + repeat("-", 2*n - 1 - 2*i));
- System.out.println("/" + repeat("*", i+1));
- }
- for (int i = 0; i < 3; i++) {
- System.out.println("|"+ repeat("*", n/2 +i)+"\\"+ repeat("*",n-2*i) + "/" +repeat("*", n/2+i) + "|");
- //System.out.print(repeat("*", n));
- }
- for (int i = 0; i < n; i++) {
- System.out.print(repeat("-", i+1));
- System.out.print("\\" + repeat("*", 2*n - 1 - 2*i) + "/");
- System.out.println(repeat("-", i+1));
- //System.out.println(dash + "\\" + star + "/" + dash);
- }
- // 2*n + 3 - 11/2 i
- }
- public static String repeat (String text, int n) {
- String output = "";
- for (int i = 0; i < n; i++) {
- output += text;
- }
- return output;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement