Compute the Average

  • + 0 comments

    !/bin/bash

    read n sum=0

    for (( i=0; i

    Calculate and print average rounded to 3 decimal places

    avg=sum / avg"