[求助]链表的问题啊..
哪位大哥翻译下啊,我根看看不懂啊,麻烦加上 /* */ .. 谢谢了..#include "stdio.h"
#include "stdlib.h"
#define S struct Worker
#define LEN sizeof(S)
struct Worker
{
int num;
char name[20];
float pay;
S *next;
};
main ()
{
int i;
S *p,*q,*head;
p=q=head=(S*)malloc(LEN);
scanf ("%d%s%f",&p->num,p->name,&p->pay);
p=(S*)malloc(LEN);
scanf ("%d%s%f",&p->num,p->name,&p->pay);
q->next=p;
q=p;
p=(S*)malloc(LEN);
scanf ("%d%s%f",&p->num,p->name,&p->pay);
q->next=p;
q=p;
q->next=0;
p=head;
while (p!=0)
{
printf ("%d,%s,%0.1f\n",p->num,p->name,p->pay);
p=p->next;
}
}