Consider the programming language with non-negative integer variables and only four types of statements.

<variable> = 0;

<variable1> = <variable2>;

<variable>++;

do <variable> times {

  <statements>

}

 

Write a sequence of statements that has the effect of

if y > 0 then

    x = y - 1;

else

    x = 0;

end-if;