eolymp
bolt
Try our new interface for solving problems
Problems

Conditional statement - 3

Conditional statement - 3

Find the value of $y$ according to the following condition: $$ y = \begin{cases} x + 5, x < -4 \\ x^2 - 3x, -4 \le x \le 7 \\ x^3 + 2x, x > 7 \end{cases} $$ \InputFile One integer $x~(-100 \le x \le 100)$. \OutputFile Print the value of $y$ according to the conditional statement above.
Time limit 1 second
Memory limit 128 MiB
Input example #1
3
Output example #1
0
Input example #2
-8
Output example #2
-3