#!/bin/bash read n sum=0 for ((i=0;i<$n;i++)) do read temp sum=$(($sum+$temp)) done printf "%.3f\n" `$(bc -l <<< "$`sum/$n") # your code goes here
Standard input is empty
Standard output is empty
./prog.sh: line 4: ((: i<: syntax error: operand expected (error token is "<") ./prog.sh: line 9: unexpected EOF while looking for matching `"' ./prog.sh: line 11: syntax error: unexpected end of file