Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- class Program
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- char simbol = Console.ReadLine()[0];
- int size = n;
- int outerdashes = n/2;
- int simbols = 1;
- for (int i = 0; i < size; i++)
- {
- Console.WriteLine("{0}{1}{0}", new string ('-', outerdashes), new string(simbol, simbols));
- if (i<size/2)
- {
- outerdashes -= 1;
- simbols += 2;
- }
- else
- {
- outerdashes += 1;
- simbols -= 2;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement