print "In this version you can use up to TEN NUMBERS! \n"; print "when you have entered the numbers you need type 'end' \n"; my $count = 1; my $total = 0; while ($count <= 10) { print "Enter number $count "; my $num = <STDIN>; chomp $num; last if $num eq "end"; $total += $num; $count++; } print " Average is: ", $total / $count, "\n";
In reply to Re: Average/mean calculator
by Laurent_R
in thread Average/mean calculator
by Paradizingmania
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |