Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Wine_Glass
- {
- class WineGlass
- {
- public static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- string dotHolder = new string('.', n / 2 - 1);
- string twoVertLines = new string('|', 2);
- string dash = new string('-', n);
- for (int i = 0 ; i < n / 2; i++)
- {
- string slash = @"\";
- string slash2 = "/";
- string asterisk = new string('*', n - 2 - 2 * i);
- string dot = new string('.', i);
- Console.WriteLine("{0}{1}{2}{3}{0}", dot, slash, asterisk, slash2);
- }
- if (n >= 12)
- {
- for(int i = 0; i < n / 2 - 2; i++)
- {
- Console.WriteLine("{0}{1}{0}", dotHolder, twoVertLines, dotHolder);
- }
- for(int i = 0; i < 2; i++)
- {
- Console.WriteLine(dash);
- }
- }
- else
- {
- for(int i = 0; i < n / 2 - 1; i++)
- {
- Console.WriteLine("{0}{1}{0}", dotHolder, twoVertLines, dotHolder);
- }
- Console.WriteLine(dash);
- }
- Console.ReadKey(true);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment