using System;
namespace Articulso.Preguntas.P0820
{
public sealed class Usobreak
{
public static void Main()
{
for (int i = 1; i <= 100; ++i)
{
// El ciclo debe finalizar cuando el valor de
// `i` sea igual a 13:
if (i == 13)
{
break;
}
// Invoca al método `Tarea`:
Tarea(i);
}
}
// Método que lleva a cabo una tarea sobre
// el valor actual de una variable de
// un ciclo for:
private static void Tarea(int i)
{
Console.WriteLine ("{0}", i.ToString());
}
}
}
dXNpbmcgU3lzdGVtOwoKbmFtZXNwYWNlIEFydGljdWxzby5QcmVndW50YXMuUDA4MjAKewogICAgcHVibGljIHNlYWxlZCBjbGFzcyBVc29icmVhawogICAgewogICAgICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKICAgICAgICB7CiAgICAgICAgICAgIGZvciAoaW50IGkgPSAxOyBpIDw9IDEwMDsgKytpKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAvLyBFbCBjaWNsbyBkZWJlIGZpbmFsaXphciBjdWFuZG8gZWwgdmFsb3IgZGUgCiAgICAgICAgICAgICAgICAvLyBgaWAgc2VhIGlndWFsIGEgMTM6CiAgICAgICAgICAgICAgICBpZiAoaSA9PSAxMykKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgLy8gSW52b2NhIGFsIG3DqXRvZG8gYFRhcmVhYDoKICAgICAgICAgICAgICAgIFRhcmVhKGkpOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIAogICAgICAgIC8vIE3DqXRvZG8gcXVlIGxsZXZhIGEgY2FibyB1bmEgdGFyZWEgc29icmUgCiAgICAgICAgLy8gZWwgdmFsb3IgYWN0dWFsIGRlIHVuYSB2YXJpYWJsZSBkZSAKICAgICAgICAvLyB1biBjaWNsbyBmb3I6CiAgICAgICAgcHJpdmF0ZSBzdGF0aWMgdm9pZCBUYXJlYShpbnQgaSkKICAgICAgICB7CiAgICAgICAgICAgIENvbnNvbGUuV3JpdGVMaW5lICgiezB9IiwgaS5Ub1N0cmluZygpKTsKICAgICAgICB9CiAgICB9Cn0=