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 SublimeLogo
- {
- class Program
- {
- static void Main(string[] args)
- {
- var n = int.Parse(Console.ReadLine());
- var space = ' ';
- var star = '*';
- var spacescount = 2 * n - 2;
- var starscount = 2;
- //top
- for (int row = 0; row < n; row++)
- {
- Console.Write(new string(space, spacescount));
- Console.Write(new string(star, starscount));
- spacescount -= 2;
- starscount += 2;
- Console.WriteLine();
- }
- //middletop1
- spacescount = 2;
- starscount = 2 * n - 2;
- for (int row = 0; row < 2; row++)
- {
- Console.Write(new string(star, starscount));
- Console.Write(new string(space, spacescount));
- spacescount += 2;
- starscount -= 2;
- Console.WriteLine();
- }
- //middletop2
- spacescount = 2;
- starscount = 2 * n - 2;
- for (int row = 0; row < 2; row++)
- {
- Console.Write(new string(star, starscount));
- Console.Write(new string(space, spacescount));
- if (spacescount > 0 && starscount > 0)
- {
- spacescount -= 2;
- starscount += 2;
- }
- Console.WriteLine();
- }
- //middlebottom1
- spacescount = 2;
- starscount = 2 * n - 2;
- for (int row = 0; row < 2; row++)
- {
- Console.Write(new string(space, spacescount));
- Console.Write(new string(star, starscount));
- spacescount += 2;
- starscount -= 2;
- Console.WriteLine();
- }
- //middlebottom2
- spacescount = 2;
- starscount = 2 * n - 2;
- for (int row = 0; row < 2; row++)
- {
- Console.Write(new string(space, spacescount));
- Console.Write(new string(star, starscount));
- if (spacescount > 0 && starscount > 0)
- {
- spacescount -= 2;
- starscount += 2;
- }
- Console.WriteLine();
- }
- //bottom
- spacescount = 2;
- starscount = 2 * n - 2;
- for (int row = 0; row < n; row++)
- {
- Console.Write(new string(star, starscount));
- Console.Write(new string(space, spacescount));
- spacescount += 2;
- starscount -= 2;
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement