var x,y : Integer;
begin
readln(x);
if x < 10 then y := x + 2 else y := x - 2;
writeln(y);
end.
Function func32651706(a As Double) As Double
func32651706 = (a + 2) * Fix((1 - Sgn(a - 10)) / 2) + (a - 2) * Fix((2 + Sgn(a - 10)) / 2)
End Function
Excel VBA
var x,y : Integer;
begin
readln(x);
if x < 10 then y := x + 2 else y := x - 2;
writeln(y);
end.
Function func32651706(a As Double) As Double
func32651706 = (a + 2) * Fix((1 - Sgn(a - 10)) / 2) + (a - 2) * Fix((2 + Sgn(a - 10)) / 2)
End Function
Excel VBA