#include <stdio.h>#include <stdlib.h>#include <time.h>int main() { int n, m; printf("Enter the lower bound (n): "); scanf("%d", &n); printf("Enter the upper bound (m): "); scanf("%d", &m); if (n > m) { printf("Invalid range. Ensure that n <= m.\n"); return 1; } srand(time(0)); //(here) int randomInRange = (rand() % (m - n + 1)) + n; printf("Random number between %d and %d: %d\n", n, m, randomInRange); return 0;}
when i tried changing the value in srand(time(0)) to srand(time(1))the code runs, takes the user input of n and m but in the end it doesn't give any output. Why is this happening?