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
|
246 Discussions
|
Please Login in order to post a comment
read x
result=x" | bc -l | xargs printf '%.3f')
echo "$result"
for fun :)
read -p "Enter expression: " expr result=expr" | bc -l) printf "%.3f\n" "$result"
read -r exp
awk "BEGIN { printf \"%.3f\n\", $exp }"