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 Problem3
- {
- class Problem3
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- char background = char.Parse(Console.ReadLine());
- char rhombus = char.Parse(Console.ReadLine());
- int center = n * 2 - 1;
- int dots = 1;
- Console.WriteLine("{0}{1}{2}{1}{0}", new string(background, n), new string(rhombus, 1), new string(background, center));
- for (int i = n-1; i > 0; i--)
- {
- center -= 2;
- Console.WriteLine("{0}{1}{2}{1}{3}{1}{2}{1}{0}",new string(background, i), new string(rhombus, 1), new string(background, dots),
- new string(background, center));
- dots += 2;
- }
- Console.WriteLine("{0}{1}{0}{1}{0}",new string(rhombus,1), new string(background, dots));
- for (int i = 1; i < n ; i++)
- {
- dots -= 2;
- Console.WriteLine("{0}{1}{2}{1}{3}{1}{2}{1}{0}", new string(background, i), new string(rhombus, 1), new string(background, dots),
- new string(background, center));
- center += 2;
- }
- Console.WriteLine("{0}{1}{2}{1}{0}", new string(background, n), new string(rhombus, 1), new string(background, center));
- for (int i = n - 1; i > 0; i--)
- {
- center -= 2;
- Console.WriteLine("{0}{1}{2}{1}{3}{1}{2}{1}{0}", new string(background, i), new string(rhombus, 1), new string(background, dots),
- new string(background, center));
- dots += 2;
- }
- Console.WriteLine("{0}{1}{0}{1}{0}", new string(rhombus, 1), new string(background, dots));
- for (int i = 1; i < n; i++)
- {
- dots -= 2;
- Console.WriteLine("{0}{1}{2}{1}{3}{1}{2}{1}{0}", new string(background, i), new string(rhombus, 1), new string(background, dots),
- new string(background, center));
- center += 2;
- }
- Console.WriteLine("{0}{1}{2}{1}{0}", new string(background, n), new string(rhombus, 1), new string(background, center));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement