so far i got some of the program but i can't figure out how to get the

greatest and smallest number from the series of number

"program that recieves as input a sries of numbers. at the end of the

input list , the program should output the total numbers of numbers

input, the largest number, smallest number and the average of all the

numbers.

thanks alot to anyone that helps me out

#!usr/loacl/bin/perl

$total = 0;

$numcounter = 0;

$largest= $number;

print "Enter a number or enter end: ";

chomp ( $number = <STDIN> );

until ($number eq "end")

{

$numcounter++;

$total += $number;

print "Enter a number or enter end: ";

chomp ( $number = <STDIN> );

}

if ( $numcounter != 0)

{

$average = $total / $numcounter;

print " \nTotal numbers inputed $numcounter";

print " \n The averaged is $average.\n ";

}

I sincerely doubt that shebang is correct. "local" is misspelled, and

you forgot the beginning /

You forgot:

use strict;

use warnings;

If your instructor did not tell you to put those at the top of every

program, drop the course and demand your money back.

What do you think that's doing? $number doesn't exist. So it's

undefined. So is $largest. What was the point of that?

Okay, here you're incrementing the total number of numbers

Here you're keeping a running total of all the numbers.

Here you find the average of the numbers.

So where's your code that attempts to do the rest? What have you

*tried* to find the largest and smallest numbers? How did it fail?

Where did you get stuck?

Make an attempt, and then ask for help if it doesn't work. No one is

too likely to write your homework for you.

Paul Lalli

1. how do i average the 2 smallest number in a range of six numbers

2. average of kth largest numbers in an array of n numbers

3. equation number, table number, figure number linked to the same paragraph number - Wanted ideas

4. Total number of unique cells or number of cells containing a specific word or number

5. Word 2k Outline Numbering - Number format - Number style - Previous Level Number

6. page number, total pages, section page number and total section pa

7. How to add the 10 smallest numbers out of a range of 20 numbers.

8. return largest number of a list of numbers in the same cell

9. How do I sum 4 number discarding the largest number.

10. Function to find the second largest number in a series of numbers

11. Function to find largest number from a series of numbers?

12. Finding 1000 largest numbers from a file having some billion numbers

13. Number Nine, Number Nine, Number Nine

14. replacing FIRST NUMBER-SECOND NUMBER with SECOND NUMBER

15. Count every group of numbers whose sum is zero & put number next to each number

2 post • Page:**1** of **1**