8 lines
136 B
Raku
8 lines
136 B
Raku
@array = (1, 2, 3);
|
|
$running_sum = 0;
|
|
|
|
foreach $element (@array) {
|
|
$running_sum += $element;
|
|
}
|
|
|
|
print "Total = $running_sum"; |