We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Linux Shell
- Bash
- Arithmetic Operations
Arithmetic Operations
Arithmetic Operations
A mathematical expression containing +,-,*,^, / and parenthesis will be provided. Read in the expression, then evaluate it. Display the result rounded to decimal places.
Constraints
All numeric values are <= 999.
Sample Input
Sample Input 1
5+50*3/20 + (19*2)/7
Sample Input 2
-105+50*3/20 + (19^2)/7
Sample Input 3
(-105.5*7+50*3)/20 + (19^2)/7
Sample Output
Sample Output 1
17.929
Sample Output 2
-45.929
Sample Output 3
22.146