Here is my code
read a
read b
c=`echo $a / $b | bc`
echo "Answer is: " $c
I inputted values 10 and 3 to a and b respectively and i got the answer 3 in integer. So i put scale as below
read a
read b
c=`scale=2;echo $a / $b | bc`
echo "Answer is: " $c
But it gives an error "command not found"
So how is it possible? See i want to store the answer in the variable, as i know to display float calculations using echo only. I want the answer 3.33 stored in the variable $c.