Recently i write a block of code:
const int sections = 10; for(int t= 0; t < 5; t++){ int i = pow(sections, 5- t -1); cout << i << en
Whats happens is the pow function returns a double so when you do this
int i = pow(sections, 5- t -1);
the decimal .99999 cuts of and you get 9999.
while printing directly or comparing it with 10000 is not a problem because it is runded of in a sense.