Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Largest Sum of Consecutive Integers

by pKai (Priest)
on Aug 31, 2006 at 10:15 UTC ( #570573=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # initialisation as before
    
    $cur = $best = $array[$cur_start] if @array;
    ...
        $cur_start = $_ + 1;
      }
    }
    
  2. or download this
    #! /usr/bin/perl -w
    use strict;
    
    ...
    Sum: $best
    Numbers: @array[$best_start..$best_end]
    );
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://570573]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2018-06-20 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (116 votes). Check out past polls.

    Notices?