Limiting random number generator

Hi, this should be a straightforward question, I am writing some code to randomly generate a number, and it works fine the only issue is I don't know how to limit the range of numbers it generates, and currently it prints between 0 and 250.

uint8_t rand[1];
sys_rand_get(rand, sizeof(rand));
printk("rand: %d\n", rand[0]);
This is the current code. I want to only generate numbers between 1 and 100.
Thanks!
Related