// program computes the sum of all even numbers from input number
This part of the objective does not make sense to me. Care giving a sample input number, like 12, and explaining what the expected result would be?
Right now it gives the result
1 + 2 + 3 + ... + 11 + 12 = 78
for the input of 12.
WolfPack
Postaholic
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115
You can do that by just changing these lines.I am not giving you the answer because if you wrote the above program yourself, you can surely do this part using the hint I have given you.
count = 1;
count = count + 1;
WolfPack
Postaholic
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115