Code://This is the header file to Initialize the function rando()
#include <time.h>
#include <stdlib.h>
rando(int x);
rando(int x)
{
srand(time(NULL));
return rand() % (x+1);
}
Code:#include <stdio.h>
#include "head.h"
int main()
{
printf("%d\n", rando(18));
return 0;
}