单向链表
单向链表的程序,请编程实现单向循环链表
#include<stdio.h>
#include<stdlib.h>
struct j
{
int date;
struct j *next;
}
int mian()
{
stryct j *p,*head,*q;
int t;
head=p=q=(struct j *)malloc(sizeof(struct j));
scanf("%d",&t);
while(t!=0;)
{
p->date=t;
q=(struct j *)malloc(sizeof(struct j));
p->nexr=q;
p=q;
scanf("%d",&t);
}
return 0;
}