Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Finding sum of numbers and storing it an Array

by tobyink (Canon)
on Sep 21, 2020 at 09:11 UTC ( [id://11121987]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl
    
    ...
    my @array = map { $_ / $totalSum } @nums;
    
    print "The required numbers are: @array";
    
  2. or download this
    #!/usr/bin/env perl
    
    ...
    my @array = map { $_ / $totalSum } @nums;
    
    print "The required numbers are: @array";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11121987]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-24 23:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found