View Single Post
Old May 2nd, 2008, 7:45 AM   #4
tomisinbamgbelu
Programmer
 
Join Date: May 2008
Posts: 5
Rep Power: 0 tomisinbamgbelu is on a distinguished road
Send a message via Yahoo to tomisinbamgbelu
Re: find out the average of odd numbers -do-while statement.

your code is quite right but the question says given by the user. ending with an odd no is not provided for, so the while statement should read x<=y; so as 2 test d last number, in case its odd.
tomisinbamgbelu is offline   Reply With Quote