// C program for generating random number for user-defined range
#include<stdio.h>
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void
main()
{
int r,i,x;
clrscr();
printf("Enter range From 1 to
\n");
scanf("%d",&r);
for (i=0;i<10;i++)
{
x=rand()%r;
printf("%d\n",x);
}
getch();
}