March 24, 2017

Post a New Question

Posted by on Thursday, February 2, 2012 at 6:05am.

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.

  • computer science - , Thursday, February 2, 2012 at 10:32am

    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.

Answer This Question

First Name:
School Subject:

Related Questions

More Related Questions

Post a New Question