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