I made a dice program usingIt gives random values from 1 to 6 but every time I run the program, it just gives me the same set of random values.I tried usingCode:dice=rand()%6 + 1;But this one always shows 1 and sometimes the other numbers. It's like 90% chance of getting 1 and I do not know why.Code:random=(rand()*time(NULL))%6 + 1;if(random>0) //since random sometimes become negative{ dice=random; }