while(print "in> " and chomp($a = <STDIN>) and $a >= 0){ $c++; $s += $a; $m = $a if !$m; $M = $a if $M < $a; $m = $a if $m > $a; } print "max: $M\navg: ".$s/$c."\nmin: $m\n";
push @r, $a and $s += $a while print "in> " and chomp($a = <STDIN>) an +d $a >= 0; @r = sort {$a cmp $b} @r; print "max: $r[$r-1]\navg: ".$s / @r." \nmin: $r[0]\n";
In reply to Re: Need help converting!!!
by Lennotoecom
in thread Need help converting!!!
by reynoldswrap530
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |