puts("Welcome to the menu for creation of linked lists.");
puts("Displaying possible actions:");
puts("1. Add at End;\n2. Delete Node;\n3. Insert Node;\n4. Search for value;\n5. Print a node;\n6. Print full list;\n7. Delete list and exit;");
puts("1. Add at End;\n2. Delete Node;\n3. Insert Node;\n4. Search for value;\n5. Print a node;\n6. Print full list;\n7. Delete list and exit;\n8. Print node prior to selected.\n");
fputs("Please input the number of your desired action: ",stdout);
scanf("%d",&choice);
switch(choice)
...
...
@@ -20,7 +20,7 @@ int menu(struct Node *head){
scanf("%d",&value);
add_to_end(head,value);
break;
case2://delete node
case2://delete node at
// break;
case3://insert
fputs("You have decided to insert a value at a specific point. Input the node index now: ",stdout);
...
...
@@ -47,6 +47,14 @@ int menu(struct Node *head){
puts("Deleting the list...");
delete_list(head);
return1;
case8://return data two areas before
puts("Returning data at offset");
fputs("Please input the node index now: ",stdout);
scanf("%d",&input);
fputs("Please input the offset prior now: ",stdout);