using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { byte segundos, minutos, horas; /*for (horas = 23; horas >= 0; horas--) { for (minutos = 59; minutos >= 0; minutos--) { for (segundos = 59; segundos >= 0; segundos --) { if (segundos < 10) Console.WriteLine(horas+ ":" + minutos + ":0" + segundos); else Console.WriteLine(horas+ ":" + minutos + ":" + segundos); } } }*/ byte h = 0,m,s; while (h <= 23) { m = 0; while (m <= 59) { s = 0; while (s < 60) { Console.WriteLine(h + ":" + m + ":" + s); s++; } m++; } h++; } h = 24; do { Console.WriteLine(h); h++; } while (h < 24); h = 24; while (h < 24) { Console.WriteLine(h); h++; } char tecla; do { Console.WriteLine("Otra vez?(y/n)"); tecla = Convert.ToChar(Console.ReadLine()); } while (tecla == 'y'); /********************************************/ Console.WriteLine("Otra vez?(y/n)"); tecla = Convert.ToChar(Console.ReadLine()); while (tecla == 'y') { Console.WriteLine("Otra vez?(y/n)"); tecla = Convert.ToChar(Console.ReadLine()); } } } }