Commit b6e8ee2d authored by Liam E. Roeth's avatar Liam E. Roeth
parents 1baf6dd5 f815a89f
#include<stdio.h>
#include<stdlib.h>
#include "llist.h"
void menu(struct Node *head){
int choice;
printf("Welcome to the menu for creation of linked lists.\n");
printf("Displaying possible actions:\n");
printf("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;\n8. Exit;\n");
printf("Please input the number of your desired action: ");
scanf("%d",&choice);
switch(choice)
{
case 1: //add at end
break;
case 2: //delete node
break;
case 3: //insert node
break;
case 4: int val;
printf("You have selected to search for a value. Please input the value now: ");
scanf("%d",&val);
search(val,*head);
break;
case 5: int node;
printf("You have selected to print a node. Please input the node index now: ");
scanf("%d",&node);
print_node(node,*head);
break;
case 6: printf("Printing full list.\n");
print_list(*head);
break;
case 7: //Delete list
break;
}
}
int main(){
struct Node *start = NULL;
int arr[] = {10,20,30,40,50};
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment