So this WSQ was kind of hard for me. I didn’t know many things that I want to share with you.
First to generate a random number you have to write
(How you want to call you variable) = rand()% (highest number you want) + 1;
Second, it is not enough with iostream, you need to add some extra:
#include <cstdlib>
#include <ctime>
Third, I didn’t know that you had to have double = (==) for it to really check if the two numbers are the same; like I have it here: if (a == ran)
I figured this out by reading some codes from: http://www.cplusplus.com/forum/beginner/98214/
It was hard but I finally did it and here is my code:
https://github.com/marinaruelas/numbers/blob/master/random
Have a nice week.
https://pixabay.com/en/carnival-venice-eyes-mask-woman-411494/
Madeinitaly
Venezian Mask
Pick a random number by marinaruelas is licensed under a Creative Commons Attribution 4.0 International License.