Files
G4G0-1/Semester 2/Computer Systems Internals & Linux/Week 3/q1.sh

8 lines
98 B
Bash

#!/bin/bash
total=0
for i in $@;
do
total=$((total + i));
done
echo "scale=2 ; $total / $#" | bc