keksd0se / mBot

Other
2 stars 0 forks source link

random % in #retardcheck #10

Closed keksd0se closed 6 years ago

keksd0se commented 9 years ago

Cy13er": int main () { const int x = 4, y = 10; int random;

srand (time (NULL));

/* erzeugt Zufallszahlen zwischen 4 und 10 inklusive */ random = (rand () % ((y + 1) - x)) + x; printf ("%d\n", random);

return 0;