#include<stdio.h>
#include<stdlib.h>
int main(){
struct node{
int data;
struct nodenext;
};
struct nodehead=NULL,*new_node,temp;
int choice;
while(choice){
new_node=(struct node)malloc(sizeof(struct node));
scanf("%d",&new_node->data);
new_node->next=0;
if(head==0)
{
head=temp=new_node;
}
else
{
temp->next=new_node;
temp=new_node;
}
printf(“do you want to continue”);
scanf("%d",&choice);
}
temp=head;
while(temp!=0)
{
printf("%d",temp->data);
temp=temp->next;
}
}