sorry about the program not being in code tags...i will try to convert that later tonight....Thanks for the help so far with the numbers, currently i'm getting like 24.984738474847 for mpg and cumMpg and wish to get 25.0. I will try that code you (keang) provided. As for the the other problem, somebody told me to insert a while loop so that i will be asked for the odometer, gas, and it will out put the mpg and cumMpg as long as the milleage is not 0. I having trouble finding out how to go about that, i have tried to insert while loops but i can't get any of them to work.