Hey again everyone :)
I was doing the tuts and problem solving question things on this site and came across the guessing game. I did it all and it's working as needed, but every time I run it, rand()%100; always gives me the result 41??
Why?
Hey again everyone :)
I was doing the tuts and problem solving question things on this site and came across the guessing game. I did it all and it's working as needed, but every time I run it, rand()%100; always gives me the result 41??
Why?
Did you seed the random number generator with srand()?
Jim]
No. I just copied the code from the website. I haven't really ever had anything to do with rand() as the temp software I write doesn't ever need random numbers. But thank you, I will look into that.