#include<stdio.h>
#include<stdlib.h>
typedef struct None{
int val;
struct None *next;
}None;
main(){
int flag=1,a;
None *head,*q,*tab;
head=(None*)malloc(sizeof(None));
head->next=NULL;
tab=head;
while(flag){
scanf("%d",&a);
q=(None*)malloc(sizeof(None));
if(a=-1){
break;
}
q->val=a;
tab->next=q;
tab=q;
}
tab->next=NULL;
head=head->next;
while(head!=NULL){
printf("%d",head->val);
head=head->next;
}
}
哭了,又找不出问题