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