Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class WineGlass
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- // last line
- if (n < 12 )
- {
- // first line
- Console.WriteLine("\\{0}/", new string('*', n - 2));
- // end first line
- // second line
- int outDots = 1;
- int innerStars = n - 4;
- for (int i = 0; i < n / 2 - 1; i++)
- {
- Console.WriteLine("{0}\\{1}/{0}", new string('.', outDots), new string('*', innerStars));
- innerStars = innerStars - 2;
- outDots++;
- }
- // end second line
- // third line
- for (int i = 0; i < n / 2 - 1; i++)
- {
- Console.WriteLine("{0}||{0}", new string('.', n / 2 - 1));
- }
- // end third line
- Console.WriteLine("{0}",new string ('-',n));
- }
- else if( n>=12)
- {
- // first line
- Console.WriteLine("\\{0}/", new string('*', n - 2));
- // end first line
- // second line
- int outDots = 1;
- int innerStars = n - 4;
- for (int i = 0; i < n / 2 - 1; i++)
- {
- Console.WriteLine("{0}\\{1}/{0}", new string('.', outDots), new string('*', innerStars));
- innerStars = innerStars - 2;
- outDots++;
- }
- // end second line
- // third line
- for (int i = 0; i < n / 2 - 2; i++)
- {
- Console.WriteLine("{0}||{0}", new string('.', n / 2 - 1));
- }
- // end third line
- Console.WriteLine("{0}\n{0}", new string('-', n));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement