Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my $totalSum = sum @nums;
    my @array = apply {$_ /= $totalSum} @nums;
    printf "Fractional Parts:\n" . "%8.6f\n" x scalar @array, @array;
    
  2. or download this
    Fractional Parts:
    0.066667
    ...
    0.200000
    0.266667
    0.333333