C Program to generate a random number
This is a simple program to generate random numbers. This logic can be used to build a Lotto program or a program to pick Lucky number and so on. Here’s the program
If it necessary to generate a number between 0 and (num-1) then this program meets the ideal solution.
/* prints a random number in the range 0 to 99 */
printf(“Random number in the 0-99 range: %dn”, random (100));