11278 - print linked list   

Description

Given a link list structure named Node.

 

typedef struct _Node {

    int data;

    struct _Node *next;

} Node;

Use this structure to implement a linked list printing.

 

You will be provided with main.c and function.h, and asked to implement function.c.

For OJ submission:

       Step 1. Submit only your function.c into the submission block. (Please choose c compiler) 

       Step 2. Check the results and debug your program if necessary.

Input

The input contains a sequence of positive integers as the linklist and the order, except the last one, which is -1, indicating the end of the sequence. 

Output

The output contains the sequence of resulting linklist. All integers are seperate by a space. Note that there is a new line ('\n') character at the end of the output.

Sample Input  Download

Sample Output  Download

Partial Judge Code

11278.c

Partial Judge Header

11278.h

Tags




Discuss