I have created a random number generator using this code.
However, this code gives me duplicates of the same number. How can I resolve this problem? ThanksCode:#include <stdio.h> #include <stdlib.h> #include <time.h> int main () { int i; int n; unsigned int seed = (unsigned int)time(NULL); srand (seed); for (i = 0; i < 54; i++) { n = rand() % 54; printf ("%d\n", n); } return 0; }