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 ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- PrintHeaderRow(n);
- for (int i = 0; i < n - 2; i++)
- {
- PrintMiddleRow(n);
- }
- PrintHeaderRow(n);
- }
- static void PrintHeaderRow(int n)
- {
- Console.WriteLine(new string('-', n * 2));
- }
- static void PrintMiddleRow(int n)
- {
- Console.Write("-");
- for (int i=0; i <(( n * 2)-2)/2; i++)
- {
- Console.Write("\\/");
- }
- Console.WriteLine("-");
- }
- }
- }
Add Comment
Please, Sign In to add comment