0
How can I randomize my quiz game?? Any one to help please
I need to make the program randomly display questions and giving out a score after the end of the program and each question must only display once.. https://code.sololearn.com/ceadKrLJjoWh/?ref=app
2 Respostas
+ 4
Split up your questions into functions,then use rand() from <cstdlib> to generate a random number,depending on that number you could call different functions in either a loop or main().
This is how you use it:
int num=rand();
int num=1+rand()%limit;
The first gives you any random number. The second gives you a random number btn 1 to limit.
It's all covered in the sololearn coarse,check it out.
0
Astralis. Have not gotten it much...