Question: I ran my program twice. Each time, I got the same sequence of pseudorandom numbers. Why? That's how ct + works, there's really no way
I ran my program twice. Each time, I got the same sequence of pseudorandom numbers. Why?
That's how ct works, there's really no way around that.
I should have seeded the random number generator with srandtimeNULL:
I needed to use rand ;
I should have used srand instead of rand
C cannot produce pseudorandom numbers.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
