when multiplying by one 100, the last var wont exactly equal one(thus why one penny always seems to be missing). A fix would be to use ceil() with the entire equation:
for future reference, when your topic is finished simply mark is as solved. This way other users can read these topics and learn something, or if this topic pops up in google readers can understand what the question was. No need to restore this post, but keep your future posts in tact.