Create a new script called calculate-average.sh
. The script should accept exactly 3 command-line
arguments and calculate the average.
The result should not round the value to the nearest integer.
Tried working it on my own, could not proceed . Used the solutions tab but not getting the testing cleared.
num1=$1
num2=$2
num3=$3
sum=$(( num1 + num2 + num3 ))
average=$(echo "$sum / 3" | bc -l)
echo $average