I'm a french beginner on luangage programming
Can you help me to make a code to generate hasard please?
i have suceed to choose a randown number with this code :
_________________________Code:#include <stdio.h> #include <stdlib.h> #include <time.h> int main() { long nombreMystere = 0; srand(time(NULL)); nombreMystere = rand(); do { printf("%ld",nombreMystere); } while (getchar()!='Q'); system("PAUSE"); return 0; }
what does i do if i want a randown number between 0-100?
i dont want use any loops.
ty for your help.