number logic

Consecutive Sum – ISC Practical 2006 Java Program

Question 1  A positive natural number, (for e.g. 27), can be represented as follows – 2+3+4+5+6+7 8+9+10 13+14 where every row represents a combination of consecutive natural numbers, which add up to 27. Write a program which inputs a positive natural number N and prints the possible consecutive number combinations, which when added give N. …

Consecutive Sum – ISC Practical 2006 Java Program Read More »