I'm trying to perform a mod (%) on 2 ints in c. My first time attempting such a thing.
The code below is in a loop where count is set to 0 outside the loop and increments by 1 every iteration. I'm expecting to see my "read" value change but it stays stuck at the value for "blah".
What am I doing wrong?
int blah=176400;
count+=1;
NSLog(@"the time = %i",count);// prints the correct increments
int read = (int)(blah % count);
NSLog(@"read %i",read); // prints out 1764000 all the time