程序未响应!!求修改!!
#define NULL 0#include<stdio.h>
void get(int x);
struct list{
char a;
struct list *Next;
};
int main(void)
{
int b,c,d;
printf("请问要输入几个字母:");
scanf("%d",&b);
get(b);
}
void get(int x)
{
int first,y;
struct list *new1,*head=NULL,*current;
for(first=1;first<=x;first++)
{
if(new1 = (struct list*)malloc(sizeof(struct list))==NULL)
printf("ERROR!");
printf("第%d个字母\n",first);
scanf("%c",&head->a);
new1->Next = head;
head=new1;
}
}