Commit f815a89f authored by h702579998's avatar h702579998

just added shit

parent 749998c9
#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