Skip to content

Commit 0cb592d

Browse files
authored
Update and rename GroupC_Practical19(C++) to GroupC_Practical19(C++).cpp
1 parent fe5d867 commit 0cb592d

File tree

1 file changed

+11
-23
lines changed

1 file changed

+11
-23
lines changed

GroupC_Practical19(C++) renamed to GroupC_Practical19(C++).cpp

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/*
2-
3-
This program is created by PARTH REWOO
2+
43
54
Department of Computer Engineering has student's club named
65
'Pinnacle Club'. Students of Second, third and final year of
@@ -18,6 +17,7 @@ d) Display list in reverse order using recursion
1817
e) Two linked lists exists for two divisions. Concatenate two
1918
lists
2019
*/
20+
2121
# include<stdio.h>
2222
# include <iostream>
2323
# include<string>
@@ -255,8 +255,7 @@ else
255255
{
256256
cout << "\nEnter PRN No. of member to be deleted : ";
257257
cin >> no;
258-
t=start->next; // t=start if we have to delete
259-
precident also..start->next is first member
258+
t=start->next; // t=start if we have to delete president also..start->next is first member
260259
while (t->next != NULL)
261260
{
262261
if (t->prn == no)
@@ -272,12 +271,10 @@ if (flag == 1)
272271
prev->next=t->next;
273272
t->next=NULL;
274273
delete t;
275-
cout << "\nMember with PRN No: " << no << " is
276-
deleted.";
274+
cout << "\nMember with PRN No: " << no << " is deleted.";
277275
}
278276
else
279-
cout << "\nMember not found in List./President or
280-
Secretary cannot be deleted.";
277+
cout << "\nMember not found in List./President or Secretary cannot be deleted.";
281278
}
282279
}
283280
void list::
@@ -393,8 +390,7 @@ choice, selectList;
393390
list
394391
l1, l2;
395392
l = & l1;
396-
X: cout << "\nSelect List\n1.List 1\n2.List
397-
2\nEnter choice : ";
393+
X: cout << "\nSelect List\n1.List 1\n2.List 2\nEnter choice : ";
398394

399395
cin >> selectList;
400396
if (selectList == 1)
@@ -415,14 +411,9 @@ X;
415411
do
416412
{
417413

418-
cout << "\n1. Create\n2. Insert
419-
President\n3. Insert secretary\n4. Insert after
420-
position(member)\n5. Display list"
421-
<< "\n6. Delete President\n7.
422-
Delete Secretary\n8. Delete Member\n9. Find total No. of
423-
members\n10. Sort list\n11. Reselect List"
424-
<< "\n12. Combine lists\n13.
425-
Reverse Display\n0. Exit\nEnter your choice :\t";
414+
cout << "\n1. Create\n2. Insert President\n3. Insert secretary\n4. Insert after position(member)\n";
415+
cout<<"5. Display list\n6. Delete President\n7.Delete Secretary\n8. Delete Member\n9. Find total No. of members\n10. Sort list\n11. Reselect List";
416+
cout<< "\n12. Combine lists\n13.Reverse Display\n0. Exit\nEnter your choice :\t";
426417
cin >> choice;
427418
switch(choice)
428419

@@ -463,8 +454,7 @@ case
463454

464455
break;
465456
case
466-
9: cout << "\nTotal members(including
467-
President & Secretary) : " << l->computeTotal();
457+
9: cout << "\nTotal members(including President & Secretary) : " << l->computeTotal();
468458
break;
469459
case
470460
10: l->sortList();
@@ -489,10 +479,8 @@ cout << "Wrong choice";
489479
}
490480

491481
}while (choice != 0);
492-
cout << "\n=============== GOOD BYE
493-
===============\n";
482+
cout << "\n=============== GOOD BYE ===============\n";
494483
return 0;
495484

496485
}
497486

498-
This program is created by PARTH REWOO

0 commit comments

Comments
 (0)