public static void Main(string[] args)
Console.WriteLine("--------------------------Printing 4th glass--------------------------");
Console.WriteLine("--------------------------Printing 5th glass--------------------------");
Console.WriteLine("--------------------------Printing 8th glass--------------------------");
static void PrintGlass(int iterations)
throw new ArgumentOutOfRangeException("iterations parameter can't be less than or equal to zero");
int topAndBottom = (2 * iterations) - 1;
StringBuilder buffer = new StringBuilder();
for(var i = topAndBottom; i > 0; i = i -2)
var circles = new string('0', i);
space = spaceCounter == 0 ? "" : new string(' ', spaceCounter);
buffer.AppendLine(string.Format("{0}{1}", space, circles));
for (var i = 1; i <= iterations;i++)
buffer.AppendLine(string.Format("{0}|", space));
var baseLine = new string('=', topAndBottom);
buffer.AppendLine(baseLine);
Console.Write(buffer.ToString());