Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace New_House
- {
- class NewHouse
- {
- public static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- for(int i = 0; i < (n + 1) / 2; i++)
- {
- string dashes = new string('-', ((n - 1) / 2) - i);
- string star = new string('*', 1 + (2 * i));
- Console.WriteLine("{0}{1}{0}", dashes, star);
- }
- for(int i = 0; i < n; i++)
- {
- string wall = "|";
- string asterisk = new string('*', n - 2);
- Console.WriteLine("{0}{1}{0}", wall, asterisk);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment