Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace FallenInLove
- {
- class Program
- {
- public static void Main(string[] args)
- {
- var n = int.Parse(Console.ReadLine());
- var tilda = 1;
- var outerDots = 2 * n;
- var innerDots = 2;
- Console.WriteLine("##{0}##{0}##", new string('.', 2 * n));
- for(var i = 1; i <= n - 1; i++)
- {
- outerDots -= 2;
- Console.WriteLine("#{0}#{1}#{2}#{1}#{0}#", new string('~', tilda), new string('.', outerDots), new string('.', innerDots));
- tilda++;
- innerDots += 2;
- }
- outerDots--;
- Console.WriteLine("{0}#{1}#{2}#{1}#{0}", new string('.', outerDots), new string('~', tilda), new string('.', innerDots));
- tilda++;
- innerDots += 2;
- tilda--;
- innerDots -= 2;
- outerDots += 2;
- for(var i = 1; i <= n - 1; i++)
- {
- tilda--;
- innerDots -= 2;
- Console.WriteLine("{0}#{1}#{2}#{1}#{0}", new string('.', outerDots), new string('~', tilda), new string('.', innerDots));
- outerDots += 2;
- }
- Console.WriteLine("{0}####{0}", new string('.', 2 * n + 1));
- for(var i = 1; i <= n; i++)
- {
- Console.WriteLine("{0}##{0}", new string('.', 2 * n + 2));
- }
- Console.Write("Press any key to continue . . . ");
- Console.ReadKey(true);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement