using System;
using System.Diagnostics;
using System.Linq;
namespace ProgramConsole
{
public class Program
{
public static void Main(string[] args)
{
MyLoop(15, 45, x => ++x);
MyLoop(60, 10, x => --x);
}
static void MyLoop(int start, int finish, Func<int, int> op)
{
for ( var i = start; i < finish; i = op(i) )
{
//
}
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uRGlhZ25vc3RpY3M7CnVzaW5nIFN5c3RlbS5MaW5xOwoKbmFtZXNwYWNlIFByb2dyYW1Db25zb2xlCnsKICAgIHB1YmxpYyBjbGFzcyBQcm9ncmFtCiAgICB7CiAgICAgICAgcHVibGljIHN0YXRpYyB2b2lkIE1haW4oc3RyaW5nW10gYXJncykKICAgICAgICB7CiAgICAgICAgICAgIE15TG9vcCgxNSwgNDUsIHggPT4gKyt4KTsKICAgICAgICAgICAgTXlMb29wKDYwLCAxMCwgeCA9PiAtLXgpOwoKICAgICAgICB9CgogICAgICAgIHN0YXRpYyB2b2lkIE15TG9vcChpbnQgc3RhcnQsIGludCBmaW5pc2gsIEZ1bmM8aW50LCBpbnQ+IG9wKQogICAgICAgIHsKICAgICAgICAgICAgZm9yICggdmFyIGkgPSBzdGFydDsgaSA8IGZpbmlzaDsgaSA9IG9wKGkpICkKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgLy8KICAgICAgICAgICAgfSAgICAgICAgICAgIAogICAgICAgIH0KICAgIH0KfQ==