Advertisement
CLazStudio

q199040935_2

Mar 16th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.28 KB | None | 0 0
  1. program q199040935_2;
  2. var x, y: real;
  3. begin
  4.   readln(x);
  5.  
  6.   if (x <= -3.5) then
  7.     y := 9 + (2 * x)
  8.   else if (x >= 1.5) then
  9.     y := 6 - (2 * x)
  10.   else if ((x < 1.5) and (x > 0)) then
  11.     y := 0.5 + (x * 5 / 3)
  12.   else
  13.     y := 0.5 - (x * 3 / 7);
  14.    
  15.   writeln(y);
  16. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement