#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
struct node{
int x;
struct node *next;
};
int i,num;
int main() {
struct node *tail;
struct node *temp;
struct node *counter;
struct node *conductor;
printf("How much data do you have to enter? ");
scanf("%d",&num);
tail=(struct node *)malloc(sizeof(struct node));
counter=tail;
tail->x=21;
do{
temp=(struct node *)malloc(sizeof(struct node));
scanf("%d",&temp->x);
temp->next=NULL;
counter->next=temp;
counter=temp;
free(temp);
i++;
}while(i<num);
conductor=tail;
while (conductor->next!=NULL){
conductor=conductor->next;}
getchar();
return 0;
}