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 Sunglasses
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- Console.WriteLine("{0}{1}{0}", new string('*', 2 * n), new string(' ', n)); //първия ред
- for (int i = 0; i < n - 2; i++)
- {
- if (i == (n - 1) / 2 - 1)
- {
- Console.WriteLine("*{0}*{1}*{0}*",
- new string('/', 2 * n - 2),
- new string('|', n));
- }
- else
- Console.WriteLine("*{0}*{1}*{0}*",
- new string('/', 2 * n - 2),
- new string(' ', n));
- }
- Console.WriteLine("{0}{1}{0}", //последния ред
- new string('*', 2 * n),
- new string(' ', n));
- }
- }
- }
- // Console.WriteLine("{0}{1}{0}", new string('*', 2 * n), new string(' ', n)); //средния ред
- // TODO: print *///////*
- // if (i == (n - 1) / 2 - 1)
- // Console.Write(new string('|', n));
- // else
- // Console.Write(new string(' ', n));
- // TODO: print *///////*
- // Console.WriteLine();
- // Console.Write(new string('*', 2 * n));
- // Console.Write(new string(' ', n));
- // Console.WriteLine(new string('*', 2 * n));
- // for (int i = 0; i < n - 2; i++)
- // {
- // // TODO: print the middle part
- // }
- // // Print the bottom part
- // Console.Write(new string('*', 2 * n));
- // Console.Write(new string(' ', n));
- // Console.WriteLine(new string('*', 2 * n));
Advertisement
Add Comment
Please, Sign In to add comment