[ create a new paste ] login | about

Link: http://codepad.org/BHwz6hfY    [ raw code | output | fork ]

sironekotoro - Perl, pasted on Sep 23:
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env perl
use strict;
use warnings;

my @array = (1..100);
my $sum = 0;

for my $var(@array){
    $sum += $var;
}

print $sum;


Output:
1
5050


Create a new paste based on this one


Comments: