Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2018-12-14 23:30 GMT
Find Nodes?
    Voting Booth?
    How many stories does it take before you've heard them all?

    Results (69 votes). Check out past polls.