Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Java
- {
- using System;
- static class Java
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- for (int i = 0; i < n; i++) { Console.WriteLine(' '.Times(n) + "~ ".Times(3)); }
- Console.WriteLine('='.Times(3 * n + 5));
- for (int i = 1; i <= n - 2; i++)
- {
- if (i == Math.Ceiling((double)(n - 1) / 2))
- { Console.WriteLine('|' + '~'.Times(n) + "JAVA" + '~'.Times(n) + '|' + ' '.Times(n - 1) + '|'); }
- else { Console.WriteLine('|' + '~'.Times(2 * n + 4) + '|' + ' '.Times(n - 1) + '|'); }
- }
- Console.WriteLine('='.Times(3 * n + 5));
- for (int i = 0; i < n; i++)
- {
- string line = ' '.Times(i) + "\\" + '@'.Times(2 * n + 4 - 2 * i) + '/';
- Console.WriteLine(line);
- }
- Console.WriteLine('='.Times(2 * n + 6));
- }
- static string Times(this char c, int x) => new string(c, x);
- static string Times(this string s, int x)
- {
- string newString = string.Empty;
- for (int i = 0; i < x; i++) { newString += s; }
- return newString;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement