<?php
/*This is my first PHP lab01*/
$n=100;
$i=0;
$s=0;
echo("Please enter value fon N\n");
$n=(int)readline(20);
$s=0;
for($i=1;$i<=$n;$i+=1)
{
if($i % 2 == 0)
{
$s=$s+$i;
echo("Current value i=".$i."S=".$s);
echo("\n");
}
}
echo("Final result suma is S=".$s);
?>
PD9waHAKCi8qVGhpcyBpcyBteSBmaXJzdCBQSFAgbGFiMDEqLwokbj0xMDA7CiRpPTA7CiRzPTA7CmVjaG8oIlBsZWFzZSBlbnRlciB2YWx1ZSBmb24gTlxuIik7CiRuPShpbnQpcmVhZGxpbmUoMjApOwokcz0wOwpmb3IoJGk9MTskaTw9JG47JGkrPTEpCnsKCWlmKCRpICUgMiA9PSAwKQogewoJJHM9JHMrJGk7CgllY2hvKCJDdXJyZW50IHZhbHVlIGk9Ii4kaS4iUz0iLiRzKTsKCWVjaG8oIlxuIik7CiB9Cn0KZWNobygiRmluYWwgcmVzdWx0IHN1bWEgaXMgUz0iLiRzKTsKPz4=