Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Random number generation for turbo c compiler in C

#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
 
int main()
{
   int n, max, num, c;
 
   printf("Enter the number of random numbers you want ");
   scanf("%d",&n);
 
   printf("Enter the maximum value of random number ");
   scanf("%d",&max);
 
   printf("%d random numbers from 0 to %d are :-\n",n,max);
   randomize();
 
   for ( c = 1 ; c <= n ; c++ )
   {
      num = random(max);
      printf("%d\n",num);
 
   }
 
   getch();
   return 0;
}