Commit 3d75117f authored by Liam E. Roeth's avatar Liam E. Roeth

cleaned up \n's in main.c

parent 69c441bf
......@@ -8,7 +8,7 @@ void panic(){
int menu(struct Node *head){
int choice, input, index, value;
puts("Welcome to the menu for creation of linked lists.");
puts("\nWelcome 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;");
fputs("Please input the number of your desired action: ",stdout);
......@@ -16,16 +16,17 @@ int menu(struct Node *head){
switch(choice)
{
case 1: //append
fputs("You have decided to insert a value at the end. Input the desired value now: \n",stdout);
fputs("You have decided to insert a value at the end. Input the desired value now: ",stdout);
scanf("%d",&value);
add_to_end(head, value);
break;
case 2: //delete node
// break;
panic();
break;
case 3: //insert
fputs("You have decided to insert a value at a specific point. Input the node index now: ",stdout);
scanf("%d",&index);
fputs("\nPlease input the value now: ",stdout);
fputs("Please input the value now: ",stdout);
scanf("%d",&value);
insert_node(head, index, value);
break;
......
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