Use of if to simulate modulus operator
Rewrite this increment() method from the NumberDisplay() class without using the % modulus operator.
/** Increment the display value by one * rolling over to zero if the limit is reached */
public void increment()
{
if(value > limit);
else
value = (value + 1);
value = 0;
}
well, i tested this out, i put value = (value + 1); it complied sucessfully, but the error came up as rollover was less then the amount. any help would be great!