I could use some help with a c++ program that has to display six unique random integers for a lottery game. the random integers have to from 1 through 54. I don't know how to make it pick random integers. please help!
#include <iostream>
#include <cstdlib>
#include <ctime>
int main(){
srand(time(0)); //Seeds the PRNG. Call only once per program.
std::cout <<rand()<<std::endl; //0 <= rand() <= RAND_MAX
}
I am having a lot of trouble with this class. how do i get it to generate the 6 random numbers. I understand the 1 to 54 but it only shows one number when i run the program