##
Check if a number can be expressed as a sum of consecutive numbers
November 9, 2016

Given a number n, the task is to check whether it can be expressed as a sum of two or more consecutive numbers or not. Examples: Input : n = 10 Output : true It can be expressed as sum of two consecutive numbers 1 + 2 + 3 + 4. Input : n =… Read More »