First, I think that a 32 bit integer would allow you 4,294,967,295 numbers

Yes, if it's unsigned. Otherwise we lose one bit to indicate positive or negative. It's possible to use unsigned integers, but as a programmer you have to be careful to make sure that all your declarations are correct and that your function calls are designed to accept unsigned values. If you don't, you get strange bugs that come up and bite you in the arse later. For the purpose of my example, I thought it would be best to assume a signed integer because that was easier.

___________
Tony Fabris
_________________________
Tony Fabris