From de2f69a10a8ec5c4de295613108719e327c4df1d Mon Sep 17 00:00:00 2001 From: Manas Khosla <43397881+ManasKhosla@users.noreply.github.com> Date: Fri, 28 Sep 2018 23:41:01 +0530 Subject: [PATCH] Added EXIT option and some fine-tunings Added EXIT option in the menu for getting out of the loop and added lines between printing the list and choices for fine-tuning the output. --- Datastructures/Linked List.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Datastructures/Linked List.cpp b/Datastructures/Linked List.cpp index 9319249fd..991c7da09 100644 --- a/Datastructures/Linked List.cpp +++ b/Datastructures/Linked List.cpp @@ -85,6 +85,7 @@ int main() cout<<"\n2. Delete"; cout<<"\n3. Search"; cout<<"\n4. Print"; + cout<<"\n0. Exit"; cout<<"\n\nEnter you choice : "; cin>>choice; switch (choice) @@ -98,7 +99,8 @@ int main() case 3 : cout<<"\nEnter the element to be searched : "; cin>>x; search(x); break; - case 4 : show(); break; + case 4 : show(); + cout<<"\n"; break; } } while(choice!=0);