+1 Steve and KingLeonidas
@KingLeonidas your code would benefit from $Console:only so you can see full listing by scrolling up and down.
both of you have code radically different than mine so i will wait a couple days before posting mine, luv to see people's different approaches to same problem.
Since presenting this challenge, i found a way to write a sub (15 lines) that lists the all the ways for a number n; it does have a limit so n up to 1000 works.
BTW it found 5 numbers before 100 that had 5 ways to get consecutive numbers that sum to n.
@KingLeonidas your code would benefit from $Console:only so you can see full listing by scrolling up and down.
both of you have code radically different than mine so i will wait a couple days before posting mine, luv to see people's different approaches to same problem.
Since presenting this challenge, i found a way to write a sub (15 lines) that lists the all the ways for a number n; it does have a limit so n up to 1000 works.
BTW it found 5 numbers before 100 that had 5 ways to get consecutive numbers that sum to n.
b = b + ...