using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Program p = new Program(); p.x(); Console.ReadKey(); } void x() { string b, w, t, n, c, g; b = " bottles of beer"; c = b.Remove(7, 1); w = " on the wall"; t = "Take one down and pass it around, "; n = "o more"; for (int a = 99; a > 0; a--) { g = a.ToString(); Console.WriteLine(g + (a > 2 ? b : c) + w + ", " + g + (a > 2 ? b : c) + ((a > 1) ? (".\n" + t + (a - 1).ToString() + (a > 2 ? b : c) + w + ".\n") : ".")); } Console.WriteLine(t + "n" + n + b + w + ".\n\nN" + n + b + w + ", n" + n + b + ".\nGo to the store and buy some more, 99" + b + w + "."); } } }