I have this loop where I want an event to occur for every 17th turn.
Code:
for(float i=1.00; i<=k; i++)
{
if((i*i)>=100)
{std::cout << "\n " << i << " | " << i*i;}
else {std::cout << "\n " << i << " | " << i*i;}
if((i/17)==(int))
{std::cout << "\n\n\n\n\n"; system("PAUSE");}
}
Never mind about whether I use float etc. I found a way for expressing every 17th to be that i/17 would be equal to an integer. I.e. 17/17==1, 34/17==2, 51/17==3 etc.
Neither do I know a way to express "integer", nor do I know any other way to solve this problem.
Feel free to help me with both these tasks.