Correct me if I'm wrong. The user enters a number and the app is supposed to add each odd number between 0 and the input? Your program, on the other hand, adds each even number less than or equal to the input then adds 1 to the total sum. To correct this, one way is that intcount = 1 should be lngsum = 1