The ways of expressing n as a sum of consecutive integers (or positive integers) is studied. For each natural number w,it is showed that if we know all odd divisor of n, then we can get all ways of expressing n as a sum of consecutive integers (or positive integers). The mean value of the number of such expressions is also investigated.