so when I'm coding Im trying to have the output print out 0.12 instead of .12. Here is my code below
echo -n "What is the total cost? ";
read cents
cost=$(echo "scale =2;$cost_in_cents/100" | bc);
percent=$(echo "scale =2;$percent / 100" | bc);
tip=$(echo "scale =2;$cost*$percent" | bc);
overall_cost=$(echo "scale =2;$cost+$tip" | bc);
average_cost=$(echo "scale =2;$overall_cost/${#GUESTS[@]}" | bc);
the output again gives me the correct output of .12 but I need a zero before the decimal place. Thanks in advance!