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;
- class Program
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int innerDots = 0;
- int middleDots = n-2;
- int lines = 1;
- while (middleDots>=0)
- {
- Console.WriteLine("{0}{1}{2}{3}{0}", new string('.', innerDots), "\\",new string('*', middleDots), "/");
- middleDots -= 2;
- innerDots++;
- lines++;
- }
- int count = 0;
- if (n>=12)
- {
- while (count < (n/2-2))
- {
- Console.WriteLine("{0}{1}{0}", new string('.', innerDots - 1), "||");
- count++;
- lines++;
- }
- }
- else
- {
- while (count < (n / 2 - 1))
- {
- Console.WriteLine("{0}{1}{0}", new string('.', innerDots - 1), "||");
- count++;
- lines++;
- }
- }
- while (lines <= n)
- {
- Console.WriteLine("{0}", new string ('-',n));
- lines++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment