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 Problem4
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- Console.Write(new string(' ', n-1));
- Console.WriteLine(new string(':', n));
- int spaces = n - 2;
- for (int i = 0; i < n - 2; i++)
- {
- Console.Write(new string(' ', spaces));
- Console.Write(':');
- Console.Write(new string('/', n - 2));
- Console.Write(':');
- Console.Write(new string('X', i));
- Console.WriteLine(':');
- spaces--;
- }
- Console.Write(new string(':', n));
- Console.Write(new string('X', n - 2));
- Console.WriteLine(':');
- int xSes = n - 3;
- spaces = 1;
- for (int i = 0; i < n - 2; i++)
- {
- Console.Write(':');
- Console.Write(new string(' ', n - 2));
- Console.Write(':');
- Console.Write(new string('X',xSes));
- Console.Write(':');
- Console.WriteLine(new string(' ', spaces));
- spaces++;
- xSes--;
- }
- Console.Write(new string(':', n));
- Console.WriteLine(new string(' ', n - 1));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement