Re: how to create random number in c? Hi,
U can use the rand() function to generate random numbers.
Use the following coding,
#include <stdio.h>
#include <stdlib.h>
#include<math.h>
void main()
{
int i=100,c;
c=rand()%100;
printf("Random numbers between 0 and 99");
printf("%d",c);
getch();
} |