Паскаль:
Program first;
Var y,x;
begin
writeln('Введите х');
readln(x);
if x>0 then
y:=x+5;
else
y:=8-5x
writeln('y = ',y);
end.
С++
int main()
{
int x,y;
cout<<"Введите х"<<endl;<br>cin>>x;
if(x>0)
{
y=x+5;
}
else
{
y=8-5x
}
cout<<"Y = "<<y;<br>system("pause");
return 0;
}