Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Task4
- {
- static void Main()
- {
- int input = int.Parse(Console.ReadLine());
- int tempDot = (input - 3) / 2;
- for (int dot = tempDot; dot >= -tempDot; dot --)
- {
- if (dot >= 0)
- {
- Console.WriteLine(new string('.', tempDot - dot) + new string('\\', 1) + new string('.', dot) + new string('|', 1) + new string('.', dot) + new string('/', 1) + new string('.', tempDot - dot));
- }
- else
- {
- Console.WriteLine(new string('.', tempDot - Math.Abs(dot)) + new string('/', 1) + new string('.', Math.Abs(dot)) + new string('|', 1) + new string('.', Math.Abs(dot)) + new string('\\', 1) + new string('.', tempDot - Math.Abs(dot)));
- }
- if (dot == 0)
- {
- Console.WriteLine(new string('-', (input - 1) / 2) + "*" + new string('-', (input - 1) / 2));
- Console.WriteLine(new string('.', tempDot - Math.Abs(dot)) + new string('/', 1) + new string('.', Math.Abs(dot)) + new string('|', 1) + new string('.', Math.Abs(dot)) + new string('\\', 1) + new string('.', tempDot - Math.Abs(dot)));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement