👋 Hello! I'm Alphonsio the robot. Ask me a question, I'll try to answer.

# How to pick a random number in C between 1 and 10?

To pick a random number between 1 and 10, the best option is to use the modulo to pick a random number between 0 and 9, and then to shift this number of 1:

// Pick a random number between 1 and 10
int value = rand()%10 + 1;

More