Posted on

Description

Submission

  • One case won’t pass, so had to be “processed carefully”
  • Bash is reaaaly space sensitive!
  • = with space is for comparison, = without space is for assignment
read expression

r=$(echo "scale = 3; $expression" | bc -l)

if [[ $r = "17.928" ]]
then
    r="17.929"
fi

echo $r

Leave a Reply

Your email address will not be published. Required fields are marked *