use Util::List;
print "Enter hourly temperatures: ";
$_ = <STDIN>;
@t = split;
$avg = sum(@t)/@t;
--------------------------
add error checking if you wish, to watch for invalid format, or an empty list.
You work for a company that requires you to compute the average temperature for 8 A.M. to 6 P.PM. each day. You are to computer program to compute the average temperature.
1 answer