# include <stdio.h>
# include <stdlib.h>
# include <time.h>
typedef struct chain
{
int data;
struct chain *next;
} list;
list *create()
{
int i ,n ;
list *head , *tail ,*p;
head = tail = NULL;
printf("Enter a number n : ");
scanf("%i",&n);
srand((unsigned)time(NULL));
for (i = 0 ;i <= n ;i++)
{
p = (list*)malloc(sizeof(list));
p->data = rand()%100 +1;
if ( head == NULL)
head = tail = p;
else
tail = tail->next;
tail->next = p;
}
return head;
}
void print_list(list *