Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Eclipse
- {
- class Eclipse
- {
- public static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- string asterisk = "*";
- string frameAsterisk = new string('*', (2 * n) - 2);
- string frames = " " + frameAsterisk + " ";
- string dash = new string('/', (2 * n) - 2);
- string bridgeDash = new string('-', n - 1);
- string spaces = new string(' ', n - 1);
- string bridgeConnector = "";
- Console.WriteLine(frames + spaces + frames);
- for(int i = 0; i < n - 2; i++)
- {
- if(i == ((n - 2) / 2))
- {
- bridgeConnector = bridgeDash;
- }
- else
- {
- bridgeConnector = spaces;
- }
- Console.WriteLine("{0}{1}{0}{2}{0}{1}{0}", asterisk, dash, bridgeConnector);
- }
- Console.WriteLine(frames + spaces + frames);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment