满意答案
1bz8z1f96
2014.07.01
采纳率:54% 等级:9
已帮助:565人
#include
#include
#define LEN sizeof(struct num)
struct num
{
int n;
long num;
struct num *next;
};
int n;
struct num * creat(void)
{
struct num *head;
struct num *p1,*p2;
n=0;
p1=p2=(struct num *)malloc(LEN);
scanf("%d %ld",&p1->n,&p1->num);
while(p1->num!=0)
{
n=n+1;
if(n=