Coding challenge

Write some code to find how many sets of two or more consecutive positive integers have a sum of $15$? (Ans: 3) (Ref: AMC 2006 12A)