Code:
packet[siz] = (char)(rand()%255);
I want it to randomise a number between 1-255 that will ALWAYS have atleast a diffrence of 10. So it will NEVER generate a number thats 1-10 above or below the number it generated before.

e.g: generates 86 the next number has to be below 76 or above 96.

any help?