Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class TelerikLogo
- {
- static void Main()
- {
- int x = int.Parse(Console.ReadLine());
- for (int row = 0; row < 3 * x - 2; row++)
- {
- for (int col = 0; col < 3 * x - 2; col++)
- {
- if (col == (x + 1) / 2 - row - 1 || col == (x + 1) / 2 + 2 * x - 3 + row)
- {
- Console.Write("*");
- }
- else if ((col == (x + 1) / 2 + row - 1 || col == (x + 1) / 2 + 2 * x - 3 - row) && row < 2 * x - 1)
- {
- Console.Write("*");
- }
- else if ((col == (x * 1) / 2 + row - 2 * x + 2 || col == (x + 1) / 2 + 4 * x - 5 - row) && row >= 2 * x - 1)
- {
- Console.Write("*");
- }
- else
- {
- Console.Write(".");
- }
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement