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 Exam03
- {
- class Exam03
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int frameWidth = 2 / n; //*
- int bridge = n - 1;
- for (int i = 1; i <= n; i++)
- {
- if (i == 1 || i == n)
- {
- int starCount = (n * 2) - 2;
- Console.Write(' ');
- Console.Write(new string('*', starCount));
- Console.Write(' ');
- Console.Write(new string(' ', n));
- Console.Write(new string('*', starCount));
- Console.Write(' ');
- }
- else
- {
- int slashCount = (n * 2) - 2;
- Console.Write('*');
- Console.Write(new string('/', slashCount));
- Console.Write('*');
- if (i == (n / 2) + 1)
- {
- Console.Write(new string('|', n - 1));
- }
- else
- {
- Console.Write(new string(' ', n - 1));
- }
- Console.Write('*');
- Console.Write(new string('/', slashCount));
- Console.Write('*');
- }
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement