Asked by jamal

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.

Answers

Answered by Steve
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.
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions