Thread Notendurchschnitt-Berechner (20 answers)
Opened by The_Marv at 2010-10-29 15:06

murphy
 2010-10-29 15:51
#142334 #142334
User since
2004-07-19
1776 Artikel
HausmeisterIn
[Homepage]
user image
Also ich würde ja sowas abgeben:
Code (perl): (dl )
1
2
3
4
5
use 5.012;
use List::Util qw(reduce);

my @grades = <STDIN>;
say((reduce { $a + $b } 0, @grades) / @grades);


;-)
When C++ is your hammer, every problem looks like your thumb.

View full thread Notendurchschnitt-Berechner