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