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

5th May 2019, 1:44 AM
Coder learner
Coder learner - avatar
2 Respuestas
+ 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.
5th May 2019, 4:26 AM
Mensch
Mensch - avatar
0
Astralis. Have not gotten it much...
5th May 2019, 3:30 PM
Coder learner
Coder learner - avatar