0

So I'm trying to write this time keeping code for a project of mine. Basically, I'm adding 0.01 to a variable over and over again.

While (A < B) {

X = X + 0.01

A = A + 1

}

I have written down the basic idea. The problem I'm encountering is that after I get into very high numbers, things start to get weird; like finding numbers in the thousandths place, numbers taken out before the decimal, and what not. I think that I may be pushing the limit to what float and double variables can hold...

So if any of you could help me make a counter that's correct or very accurate, I'd be appreciative.