如何把链表第一行打印到最后一行其余依次不变?




```define  N  5 //进程个数 
typedef struct Node{
  char name[10];     //进程名
  int cputime = 0;   //CPU已运行的时间单位数
  int needtime;  //进程还需要的时间单位数
  char state;    //进程状态
  int count;
  int round; 
  struct Node *next;  
}Node;


void creatList(Node *head)//创建初始链表 
{
    Node* rear = head;
    int i = 0;
    for(i = 0 ; i < N ; i++){
    printf("input Number %d's Name and needtime:",i+1);
    Node *p = (Node*)malloc(sizeof(Node));
    scanf("%s",&p->name);
    scanf("%d",&p->needtime);
    p->cputime = 0;
    p->count = 0;
    p->round = 0;
    if(i == 0) p->state = 'R';
    else   p->state = 'W'; 
    p->next = head;
    rear->next = p;
    rear = p;
    //printf("\n%s,%d,%c,%d\n",p->name,p->needtime,p->state,p->cputime);
    }
}

void  print(Node *head)//遍历链表 
{
    Node *p1=head->next;
    Node *p2=head->next;
    Node *p3=head->next;
    int i=0;
    printf("\n Name cputime needtime count round state");
    for(i = 0 ; i < N ; i++){   
    printf("\n%4s %5d %8d %6d %5d %5c\n",p1->name,p1->cputime,p1->needtime,p1->count,p1->round,p1->state);
    p1=p1->next;       
    }
    printf("\n就绪队列:"); 
    for(i = 0 ; i < N ; i++){
    if(p2->state == 'W') printf("%s ",p2->name);
    p2=p2->next;
    }    
    printf("\n完成队列:"); 
    for(i = 0 ; i < N ; i++){
    if(p3->state == 'F') printf("%s ",p2->name);
    p3=p3->next;
    }
    printf("\n");
}

int main(){
    Node *head = (Node*)malloc(sizeof(Node));
    head->next = head;
    creatList(head);
    print(head);
     print(head->next);
    return 0;
}
```c


链表的行怎么理解?