Help for this page

Select Code to Download


  1. or download this
    my @array = join(' ' , keys %num) . "\n";
    
  2. or download this
    my @array = keys %num;
    
  3. or download this
    my @num = ();
    
  4. or download this
    while(scalar @num < 5){
      push @num, int(rand(50) + 1);
    }
    
  5. or download this
    push(@num, int(rand(50) + 1)) for(1..5);
    
  6. or download this
    print join(' ' , @num), "\n";
    
  7. or download this
    my $sum = 0;
    
    ...
    }
    
    print "The sum is: $sum\n";
    
  8. or download this
    my @num = ();
    
    ...
    
    print join(' ' , @num), "\n";
    print "The sum is: $sum\n";
    
  9. or download this
    my @num = ();
    my $sum = 0;
    ...
    }
    
    print join(' ' , @num), "\nThe sum is: $sum\n";