Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main()
- {
- int size = int.Parse(Console.ReadLine());
- int spaces = (size - 1) / 2;
- int forTop = size + 1;
- int neckSpaces = (size + 1) - 2;
- int heightNeck = (size + 1) / 2;
- int cone = (size - 3) / 2;
- string topSpaces = new string(' ', spaces);
- string top = new string('*', forTop);
- string neck = new string(' ', neckSpaces);
- Console.WriteLine(topSpaces + top + topSpaces);
- for (int h = 0; h < heightNeck; h++)
- {
- Console.WriteLine(topSpaces + "*" + neck + "*" + topSpaces);
- }
- for (int c = 1; c <= cone; c++)
- {
- int spaceIn = (size - 1 + c * 2);
- int spaceOut = (((size - 1) / 2) - c);
- string spacesIn = new string(' ', spaceIn);
- string spacesOut = new string(' ', spaceOut);
- Console.WriteLine(spacesOut + "*" + spacesIn + "*" + spacesOut);
- }
- //bubbles
- for (int f = 0; f < size; f++)
- {
- string froath = new string('.', (size - 1) * 2);
- Console.WriteLine("*" + froath + "*");
- }
- //beer
- for (int b = 0; b < size; b++)
- {
- string beer = new string('@', (size - 1) * 2);
- Console.WriteLine("*" + beer + "*");
- }
- string bottom = new string('*', size * 2);
- Console.WriteLine(bottom);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement