10945 - Increasing 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 increasing 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.

Output

Please follow the output of program

Sample Input  Download

Sample Output  Download

Partial Judge Code

10945.c

Partial Judge Header

10945.h

Tags

10502HW1 10502HW 10402HW1 105那個分錯類了...



Discuss