using System;
public class Test
{
public static void Main( )
{
int n= 0 ; int i= 0 ; int s= 0 ;
Console.WriteLine ( "Please enter value for N\n " ) ;
n= int .Parse ( Console.ReadLine ( ) ) ;
s= 0 ;
for ( i= 1 ; i<= n; i+= 1 )
{
if ( i % 2 == 0 )
{
s= s+ 1 ;
Console.WriteLine ( "Current value i=" + i+ "S=" + s) ;
}
}
Console.WriteLine ( "Final result suma is S=" + s) ;
}
}
dXNpbmcgU3lzdGVtOwoKcHVibGljIGNsYXNzIFRlc3QKewogcHVibGljIHN0YXRpYyB2b2lkIE1haW4oKQogewogaW50IG49MDsgaW50IGk9MDsgaW50IHM9MDsKIENvbnNvbGUuV3JpdGVMaW5lKCJQbGVhc2UgZW50ZXIgdmFsdWUgZm9yIE5cbiIpOwogbj1pbnQuUGFyc2UoQ29uc29sZS5SZWFkTGluZSgpKTsKIHM9MDsKIGZvcihpPTE7aTw9bjtpKz0xKQogewogaWYoaSAlIDIgPT0gMCkKIHsKIHM9cysxOwogQ29uc29sZS5Xcml0ZUxpbmUoIkN1cnJlbnQgdmFsdWUgaT0iK2krIlM9IitzKTsKIH0KfQogQ29uc29sZS5Xcml0ZUxpbmUoIkZpbmFsIHJlc3VsdCBzdW1hIGlzIFM9IitzKTsKIH0KfQ==