12576 - decreasing 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 decreasing integer link list.

 

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.

main.c

function.h

Input

A non negative integer data per rows, if input is smaller then 0 then exit the while loop and exit the program.

(note that : the number of input integer data will not exceed 13000)

Output

Please follow the output of program

Sample Input  Download

Sample Output  Download

Partial Judge Code

12576.c

Partial Judge Header

12576.h

Tags




Discuss