Question: I ran my program twice. Each time, I got the same sequence of pseudorandom numbers. Why? That's how c + + works, there's really no

I ran my program twice. Each time, I got the same sequence of pseudorandom numbers. Why?
That's how c++ works, there's really no way around that.
I should have seeded the random number generator with srand(time(NULL));
I needed to use rand()%6+1;
I should have used srand() instead of rand().
C++ cannot produce pseudorandom numbers.
I ran my program twice. Each time, I got the same

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!