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

Re: get next higher number

by Anonymous Monk
on Jun 12, 2018 at 16:08 UTC ( #1216479=note: print w/replies, xml ) Need Help??


in reply to get next higher number

This almost sounds like a homework problem. If the file is unordered, you must read through all of it, first looking for numbers that are bigger than the one you have. You must keep each number and check each subsequent bigger-number to see if it is smaller than the one you already have, while also correctly handling the first-number case. If you can't code that, go ask your teacher.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2018-07-20 22:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (441 votes). Check out past polls.

    Notices?