1
1
/*
2
-
3
- This program is created by PARTH REWOO
2
+
4
3
5
4
Department of Computer Engineering has student's club named
6
5
'Pinnacle Club'. Students of Second, third and final year of
@@ -18,6 +17,7 @@ d) Display list in reverse order using recursion
18
17
e) Two linked lists exists for two divisions. Concatenate two
19
18
lists
20
19
*/
20
+
21
21
# include < stdio.h>
22
22
# include < iostream>
23
23
# include < string>
255
255
{
256
256
cout << " \n Enter PRN No. of member to be deleted : " ;
257
257
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
260
259
while (t->next != NULL )
261
260
{
262
261
if (t->prn == no)
@@ -272,12 +271,10 @@ if (flag == 1)
272
271
prev->next =t->next ;
273
272
t->next =NULL ;
274
273
delete t;
275
- cout << "\nMember with PRN No: " << no << " is
276
- deleted.";
274
+ cout << " \n Member with PRN No: " << no << " is deleted." ;
277
275
}
278
276
else
279
- cout << "\nMember not found in List./President or
280
- Secretary cannot be deleted.";
277
+ cout << " \n Member not found in List./President or Secretary cannot be deleted." ;
281
278
}
282
279
}
283
280
void list::
@@ -393,8 +390,7 @@ choice, selectList;
393
390
list
394
391
l1, l2;
395
392
l = & l1;
396
- X: cout << "\nSelect List\n1.List 1\n2.List
397
- 2\nEnter choice : ";
393
+ X: cout << " \n Select List\n 1.List 1\n 2.List 2\n Enter choice : " ;
398
394
399
395
cin >> selectList;
400
396
if (selectList == 1 )
415
411
do
416
412
{
417
413
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 << " \n 1. Create\n 2. Insert President\n 3. Insert secretary\n 4. Insert after position(member)\n " ;
415
+ cout<<" 5. Display list\n 6. Delete President\n 7.Delete Secretary\n 8. Delete Member\n 9. Find total No. of members\n 10. Sort list\n 11. Reselect List" ;
416
+ cout<< " \n 12. Combine lists\n 13.Reverse Display\n 0. Exit\n Enter your choice :\t " ;
426
417
cin >> choice;
427
418
switch (choice)
428
419
463
454
464
455
break ;
465
456
case
466
- 9: cout << "\nTotal members(including
467
- President & Secretary) : " << l->computeTotal();
457
+ 9 : cout << " \n Total members(including President & Secretary) : " << l->computeTotal ();
468
458
break ;
469
459
case
470
460
10 : l->sortList ();
@@ -489,10 +479,8 @@ cout << "Wrong choice";
489
479
}
490
480
491
481
}while (choice != 0 );
492
- cout << "\n=============== GOOD BYE
493
- ===============\n";
482
+ cout << " \n =============== GOOD BYE ===============\n " ;
494
483
return 0 ;
495
484
496
485
}
497
486
498
- This program is created by PARTH REWOO
0 commit comments