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
- Discussions
Arithmetic Operations
Arithmetic Operations
Sort by
recency
|
237 Discussions
|
Please Login in order to post a comment
SOLVED
start of script
!/bin/bash
read expression result=expression" | bc -l) rounded_res=result") echo $rounded_res
read expr
result=expr" | bc -l)
printf "%.3f\n" "$result"
read input printf "%.3f\n"
echo "$input" | bc -l
this works totally fine