Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- Console.WriteLine("{0}*{0}", new string('.', (3*n)/2));
- int firstDots = 0;
- int middleDots = ((3*n)-3)/2;
- for (int i = 1; i <= n-1; i++)
- {
- firstDots += 1;
- middleDots -= 1;
- Console.WriteLine("{0}*{1}*{1}*{0}", new string ('.', firstDots), new string ('.', middleDots));
- }
- for (int i = 1; i < (n / 2) + 1; i++)
- {
- Console.WriteLine("{0}{1}{0}", new string('.', n), new string('*', n));
- }
- Console.WriteLine("{0}", new string('*', 3*n));
- for (int i = 1; i < (n/2)+1; i++)
- {
- Console.WriteLine("{0}{1}{0}", new string ('.', n), new string ('*', n));
- }
- int dotsFirst = n;
- for (int i = 1; i <= n-1; i++)
- {
- dotsFirst -= 1;
- middleDots += 1;
- Console.WriteLine("{0}*{1}*{1}*{0}", new string('.', dotsFirst), new string ('.', middleDots - 1));
- }
- Console.WriteLine("{0}*{0}", new string('.', (3 * n) / 2));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement