Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp38
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int waves = n - 2;
- int upperDots = 2 * n + 1;
- Console.WriteLine("+{0}+{1}", new string('~', waves), new string('.', upperDots));
- int rightDots = 2 * n;
- for (int i = 0; i < (2 * n) + 1; i++)
- {
- int leftDots = i;
- Console.WriteLine("|{0}\\{1}\\{2}", new string('.', leftDots), new string('~', waves), new string('.', rightDots));
- rightDots--;
- }
- int lowerRightDots = 2 * n;
- for (int i = 0; i < (2 * n) + 1; i++)
- {
- int lowerLeftDots = i;
- Console.WriteLine("{0}\\{1}|{2}|", new string('.', lowerLeftDots), new string('.', lowerRightDots), new string('~', waves));
- lowerRightDots--;
- }
- Console.WriteLine("{0}+{1}+", new string('.', upperDots), new string('~', waves));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement