<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7946301980552876196</id><updated>2026-05-26T07:08:29.105-07:00</updated><category term="code"/><category term="C++"/><category term="function"/><category term="compiler"/><category term="example"/><category term="project"/><category term="string"/><category term="array"/><category term="cpp"/><category term="codeblocks"/><category term="pointers"/><category term="queue"/><category term="source"/><category term="file"/><category term="find"/><category term="number"/><category term="program"/><category term="using"/><category term="cpp_tutorial"/><category term="for"/><category term="functions"/><category term="list"/><category term="pass"/><category term="triangle"/><category term="tutorial"/><category term="C++ Operator Precedence"/><category term="Fibonacci series in c++"/><category term="Recursion"/><category term="assignment"/><category term="binary"/><category term="by"/><category term="c"/><category term="c programming projects"/><category term="c++ projects"/><category term="calculator"/><category term="class"/><category term="cpp code"/><category term="data"/><category term="do while loop in c++"/><category term="do. while"/><category term="hollow"/><category term="largest"/><category term="learn"/><category term="linked"/><category term="loop"/><category term="matrices"/><category term="maximum"/><category term="numbers"/><category term="pointer-examples"/><category term="projects"/><category term="reference"/><category term="shape"/><category term="solution"/><category term="strcat"/><category term="while loop in c++"/><category term="ASCII"/><category term="Armstrong number code dry run with sample input."/><category term="Armstrong number code in c++"/><category term="Armstrong number logic"/><category term="Associativity table"/><category term="C++ EXAMPLES SHAPES"/><category term="C++ Increment and decrement operators"/><category term="C++ OPERATOR"/><category term="C++ Programming Games"/><category term="C++ decimal to binary."/><category term="C++ if-else"/><category term="C++ keywords"/><category term="C++ multiple line comments"/><category term="C++ shapes"/><category term="C++program to find factorial"/><category term="CH 6: C++ Comments"/><category term="Decimal to binary conversion"/><category term="Download"/><category term="Evaluating Sequence of Operators"/><category term="Fibonacci series in cplusplus"/><category term="Fibonacci series logic"/><category term="Find Perfect Number in C++"/><category term="Find Prime Number in C"/><category term="Find Prime Number in C++"/><category term="Finding Perfect Number"/><category term="GCD"/><category term="GCD c++ program"/><category term="Grade points calculate using switch statment"/><category term="Greatest Common Divisor"/><category term="Hours Format"/><category term="Hours conversion program in C++"/><category term="Introduction of blog"/><category term="Keywords or Reserve words in C++ Programming"/><category term="Linear search example for c programmer"/><category term="Linker"/><category term="Loops"/><category term="Multiplication table c++"/><category term="Operator Associativity"/><category term="Perfect Number C++"/><category term="Perfect Number Program"/><category term="Prime Number Logic"/><category term="Prime Number Program Code"/><category term="Prime Numbers Program"/><category term="Standards format and 24 format"/><category term="Switch statement syntax"/><category term="The history of C and C++"/><category term="Tricky C++ questions"/><category term="Variables and Data types in C++ programming"/><category term="a digit"/><category term="add"/><category term="alphabets"/><category term="and operator"/><category term="android"/><category term="another-file"/><category term="app"/><category term="append"/><category term="area"/><category term="area of rectangle"/><category term="area of triangle"/><category term="argument"/><category term="array based queue c++"/><category term="array c++ code example."/><category term="asterisk"/><category term="basic"/><category term="basics"/><category term="binary-number"/><category term="blog description"/><category term="bof"/><category term="box shape"/><category term="box shape program c++"/><category term="bubble-sort"/><category term="c programming language sequential search tutorial"/><category term="c++ area of rectangle."/><category term="c++ box shape"/><category term="c++ code"/><category term="c++ example"/><category term="c++ program to find Armstrong number in c++"/><category term="c++ programing"/><category term="c++ shapes code"/><category term="c++ stack code"/><category term="c++ switch statement"/><category term="c++ switch statement example"/><category term="c++. code"/><category term="calculate GPA c++ program example"/><category term="calling"/><category term="char in C++"/><category term="check capital letter"/><category term="circle"/><category term="codes"/><category term="complex"/><category term="concatenate"/><category term="const"/><category term="const-pointer-program"/><category term="constant"/><category term="control structure example"/><category term="convert"/><category term="copy"/><category term="count"/><category term="count spaces"/><category term="cplusplus"/><category term="cpp code right triangle pattern"/><category term="database"/><category term="decimal-number"/><category term="delete"/><category term="descending"/><category term="detecting"/><category term="diamond"/><category term="difference between recursion and iteration"/><category term="doubly"/><category term="down"/><category term="dry run c++ program to reverse a number"/><category term="elements"/><category term="else"/><category term="eof"/><category term="example program C++ switch statement"/><category term="examples"/><category term="factorial in C++"/><category term="factorial program in c++ using recursive function"/><category term="fgets"/><category term="file-pointer"/><category term="find Armstrong number in c++"/><category term="find area of triangle having values of three sides"/><category term="find last prime number in c++"/><category term="first"/><category term="float"/><category term="fopen"/><category term="for loop in c++"/><category term="for loop to find table of number"/><category term="fputs"/><category term="functions code examples"/><category term="functions prototype"/><category term="give"/><category term="greatest number between three c++"/><category term="handling"/><category term="hellow"/><category term="help"/><category term="heron&#39;s formula"/><category term="high level language"/><category term="hollow square cplusplus"/><category term="if"/><category term="if statement"/><category term="if-else"/><category term="if-else statement"/><category term="implementation of queue using singly linked list in c++"/><category term="in"/><category term="input"/><category term="insert"/><category term="interpreter"/><category term="inverted"/><category term="isosceles"/><category term="isosceles triangle"/><category term="iteration"/><category term="keypress"/><category term="language translators and interpreters"/><category term="linear search recursive code c++"/><category term="link"/><category term="linked list"/><category term="loader in c program"/><category term="loop in c++"/><category term="low level language"/><category term="machine"/><category term="matrix"/><category term="max"/><category term="max-number"/><category term="memchr"/><category term="min"/><category term="minimum"/><category term="mode"/><category term="modes"/><category term="multiplication"/><category term="nested if statement"/><category term="newline"/><category term="not operator"/><category term="object program"/><category term="of"/><category term="online"/><category term="opening"/><category term="operator"/><category term="operator precedence table"/><category term="or operator"/><category term="order"/><category term="palindrome number dry run"/><category term="palindrome number example"/><category term="palindrome number in c++"/><category term="palindrome number logic"/><category term="path setting"/><category term="pay"/><category term="perimeter of rectangle"/><category term="pointer"/><category term="pointer example"/><category term="pointers multiplication"/><category term="pointers power function"/><category term="pop"/><category term="positive number"/><category term="postfix"/><category term="postfix decremet operator"/><category term="postfix increment operator"/><category term="power function"/><category term="prefix"/><category term="prefix decrement operator"/><category term="prefix increment operator"/><category term="prime"/><category term="prime number tricky question"/><category term="program number multiplication table"/><category term="program portability"/><category term="program to find Fibonacci series"/><category term="program to find factorial of a number"/><category term="programming"/><category term="project for c programmer"/><category term="push"/><category term="rand()"/><category term="random"/><category term="random number examples"/><category term="range"/><category term="read write c file"/><category term="recursive"/><category term="recursive-function-example-code"/><category term="recursively c++ linear search code"/><category term="recursively linear search c++"/><category term="revers"/><category term="reverse number code"/><category term="right triangle shape code using for loop c++"/><category term="roll"/><category term="sample code without using arrays"/><category term="search"/><category term="searching algorithm example searching algorithms linear search example code"/><category term="sequential  Search example"/><category term="series"/><category term="setting"/><category term="simple recursion program in c++"/><category term="simple-projects"/><category term="size"/><category term="sizeof"/><category term="small letter"/><category term="smallest"/><category term="solutions"/><category term="sort"/><category term="sorting-example"/><category term="source code"/><category term="special character"/><category term="square shape in c++"/><category term="square shape in c++ using for loop"/><category term="srand()"/><category term="stack"/><category term="stack functions"/><category term="statements"/><category term="std::swap"/><category term="strchr"/><category term="streams"/><category term="string function"/><category term="string-class"/><category term="strings"/><category term="strncat"/><category term="student"/><category term="swap"/><category term="swap function in c++"/><category term="swap numbers in c++ example code"/><category term="swap values of two intergers in C++"/><category term="swap with two variables"/><category term="swap without temp"/><category term="swap without third variable"/><category term="swapping in C++"/><category term="swapping values."/><category term="switch"/><category term="text"/><category term="time()"/><category term="transpose"/><category term="turbo"/><category term="turbocpp"/><category term="tutorial_Cpp"/><category term="two"/><category term="types"/><category term="unary"/><category term="understanding"/><category term="update"/><category term="upside"/><category term="used"/><category term="user"/><category term="using 2D-arrays"/><category term="using nested for loop"/><category term="using nested for loop and asterisk character"/><category term="using-function"/><category term="value"/><category term="values"/><category term="vowel"/><category term="what is Fibonacci series"/><category term="while"/><category term="without"/><category term="world"/><category term="write"/><title type='text'>C++ Programming Tutorial for Beginners</title><subtitle type='html'>C++ Programming Basics tutorials, C++ Programs Examples, Variables, Operators, Comments and Data Types in C++, Keywords in C++, C++ Expressions, Control Structures, Decision Making Structures, Loops(for loop, while loop, Do-while-Loop) in C++ all in cpp programming tutorials.&#xa;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>118</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-7149599761142462517</id><published>2019-12-12T13:54:00.012-08:00</published><updated>2021-03-03T07:21:24.273-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++ Programming Games"/><category scheme="http://www.blogger.com/atom/ns#" term="c++ projects"/><category scheme="http://www.blogger.com/atom/ns#" term="projects"/><title type='text'>Tic Tac Toe c++ game project source code and documentation</title><content type='html'>&lt;span style=&quot;font-size: large;&quot;&gt;Here we will learn how to develop a tic tac toe multiplayer game project in С++ programming language with source code&lt;br /&gt; &lt;br /&gt;&lt;b&gt; Introduction &lt;/b&gt;&lt;br /&gt; Let&#39;s assume you are a beginner in the c++ programming language and looking for a detailed guide with source code for the tic tac toe game.&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;This post will definitely help you to guide the complete process of development with a detailed explanation of code. &lt;br /&gt; &lt;br /&gt;This C++ Game project is developed using C++ code blocks IDE. It has a defined board size of 5X5 with two modes.&lt;br /&gt; &lt;br /&gt; 1. Player vs Player.   2. Player vs Computer&lt;br /&gt; &lt;br /&gt;&lt;b&gt; C++ Concepts used in this c++ code project&lt;/b&gt;:&lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;https://fahad-cprogramming.blogspot.com/2011/08/variables-and-data-types-in-c.html&quot;&gt;Variables&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Two-dimensional Arrays (2D arrays) &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Nested for loop &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;https://fahad-cprogramming.blogspot.com/2012/08/if-else-statement-in-c-programming.html&quot;&gt;if else statement&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://fahad-cprogramming.blogspot.com/2014/05/cpp-tutorial-functions-in-c-examples.html&quot;&gt;functions&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt; &lt;br /&gt;&lt;b&gt; Code Explanation&lt;/b&gt;&lt;br /&gt; In this c++ game, there are 5 global variables and 11 functions. Every function defines a separate different action in the game. The practice of defining functions for a separate action or related work always helps to keep the code clean, readable, and also trackable.&lt;br /&gt; &lt;br /&gt;&lt;b&gt; Variables&lt;/b&gt;&lt;br /&gt; #define BoardSize 5&lt;br /&gt; char Player1Move = &#39;X&#39;;&lt;br /&gt; char Player2Move = &#39;O&#39;;&lt;br /&gt; int p1 = 1;&lt;br /&gt; int p2 = 2;&lt;br /&gt; &lt;br /&gt;&lt;b&gt; Functions&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;void menu();&lt;br /&gt; void printBoard();&lt;br /&gt; void input(int);&lt;br /&gt; void player1();&lt;br /&gt; void player2();&lt;br /&gt; void p2p();&lt;br /&gt; bool check();&lt;br /&gt; bool defend(int, int, int);&lt;br /&gt; bool attack();&lt;br /&gt; void computerMoves(int);&lt;br /&gt; void p2c(); &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt; 2D Arrays&lt;/b&gt;&lt;br /&gt; &lt;br /&gt; char board[BoardSize][BoardSize];&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;int b[BoardSize][BoardSize] = { 0 }; How code works?&lt;br /&gt; &quot;board&quot; and &quot;b&quot; are two arrays, the board represents X for player 1 and O for player 2. &#39;b&#39; is used only in player vs Computer game represents 1 for the first player and 2 for the second player which helps to build logic for computer moves.&lt;br /&gt; &lt;br /&gt;&lt;b&gt; Global variables description&lt;/b&gt;&lt;br /&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;BoardSize defines the tic tac toe game board size of 5 &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;player1Move defines the symbol for player 1 which is &#39;X&#39; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;player2Move defines the symbol for player 2 which is &#39;O&#39; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;p1 represents value for the first player, it will be 1 or 2 &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;p2 represents value for the second player, it will be 1 or 2 &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;p1 and p2 are the variables that help to build the logic for the player to computer module&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;player will select as a 1st or 2nd turn &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;br /&gt;&lt;b&gt; Functions description&lt;/b&gt;&lt;br /&gt; &lt;br /&gt;&lt;b&gt; menu&lt;/b&gt;&lt;br /&gt; simple menu function shows and manage three options &lt;br /&gt;&lt;br /&gt;player vs player &lt;br /&gt;player vs computer &lt;br /&gt;exit &lt;br /&gt; according to the user choice call-related function.&lt;br /&gt; &lt;br /&gt;&lt;b&gt; printBoard&lt;/b&gt;&lt;br /&gt; print the 5-by-5 board on the console.&lt;br /&gt; &lt;br /&gt;&lt;b&gt; input(int) &lt;/b&gt;&lt;br /&gt;Takes input from user in both cases, player to player(form both players) and in the player to computer(only form player). &lt;br /&gt; Asks the user to enter row number and column number for example 1 and 1 mean first cell of the board&lt;br /&gt; &lt;br /&gt;&lt;b&gt; player1&lt;/b&gt;&lt;br /&gt;Calls in the case of player to player for player 1 move simply clear the screen first and then print the marker sign of player and then call above described input function.&lt;br /&gt; &lt;br /&gt;&lt;b&gt; player2&lt;/b&gt;&lt;br /&gt;Calls in the case of a player to player for player 2 move simply clear the screen first and then print the marker sign of player and then call above described input function.&lt;br /&gt; &lt;br /&gt;&lt;b&gt; p2p&lt;/b&gt;&lt;br /&gt;Calls player1 and player2 functions one by one and calls check function after every turn of the player e.g check function call when player1 place his/her marker on the board.&lt;br /&gt; &lt;b&gt;&lt;br /&gt; check&lt;/b&gt;&lt;br /&gt;Checks the status of the game after every placement of the new marker this function will return true when all marks of the same type are in any row, column, or diagonally, otherwise, this function will return false.&lt;br /&gt; &lt;br /&gt;&lt;b&gt; defend&lt;/b&gt;&lt;br /&gt;This function is for computer vs player move and called for computer move in this function computer will check the first all rows, columns and diagonals.&lt;br /&gt; &lt;br /&gt; If the computer is having a possible winning move. Take the step and wins and also Checks if the player (opponent) has a possible winning move, takes a step to block the player.&lt;br /&gt; &lt;b&gt;&lt;br /&gt; attack aka Attacking move&lt;/b&gt;&lt;br /&gt;Take a step such that it has winning possibilities in the next moves. place the marker in such a row or column which contains computer&#39;s marker more.&lt;br /&gt; &lt;b&gt;&lt;br /&gt; computerMove&lt;/b&gt;&lt;br /&gt;Calls first defend function, check any possibility to win in this move, then check any possibility for the player wins.&lt;br /&gt; &lt;br /&gt; If find any possibility to win or defend, place the marker at that place but if couldn&#39;t find then return false and if defend function return false then call the attack function.&lt;br /&gt; &lt;br /&gt; if any cell is empty which may help the computer to win in the next moves then place a marker at that point but if not found then place any cell empty in the board.&lt;br /&gt; &lt;br /&gt;&lt;b&gt; p2c&lt;/b&gt;&lt;br /&gt; first asks the user to play as a first or second player then according to the user&#39;s choice call the first turn for computer or player after every turn call the check function to determine the winning of any player, and when board filled, draw the game and return to the main menu.&lt;br /&gt; &lt;br /&gt;&lt;b&gt; C++ Source Code &lt;/b&gt;&lt;br /&gt;
  
  &lt;!--HTML generated using hilite.me--&gt;
  &lt;div style=&quot;background: rgb(255, 255, 255); border-color: gray; border-image: initial; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
    &lt;table&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;
            &lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725&lt;/pre&gt;&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0px;&quot;&gt;&lt;span style=&quot;color: #557799;&quot;&gt;#include&amp;lt;iostream&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #557799;&quot;&gt;#include&amp;lt;Windows.h&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #557799;&quot;&gt;#include&amp;lt;time.h&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #557799;&quot;&gt;#include&amp;lt;cstdlib&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #557799;&quot;&gt;#define BoardSize 5&lt;/span&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;char&lt;/span&gt; Player1Move &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0044dd;&quot;&gt;&#39;X&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;char&lt;/span&gt; Player2Move &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0044dd;&quot;&gt;&#39;O&#39;&lt;/span&gt;;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;menu&lt;/span&gt;();
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;printBoard&lt;/span&gt;();
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;input&lt;/span&gt;(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt;);
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;player1&lt;/span&gt;();
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;player2&lt;/span&gt;();
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;p2p&lt;/span&gt;();
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;bool&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;check&lt;/span&gt;();
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;bool&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;defend&lt;/span&gt;(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt;, &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt;, &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt;);
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;bool&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;attack&lt;/span&gt;();
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;computerMoves&lt;/span&gt;(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt;);
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;p2c&lt;/span&gt;();
&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;using&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;namespace&lt;/span&gt; std;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;char&lt;/span&gt; board[BoardSize][BoardSize];
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; b[BoardSize][BoardSize] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; { &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; }; &lt;span style=&quot;color: #888888;&quot;&gt;// additional array for efficient computer Vs Human Game.&lt;/span&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;main&lt;/span&gt;()
{
	menu();
	system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;pause&quot;&lt;/span&gt;);
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;;
}
&lt;span style=&quot;color: #888888;&quot;&gt;//Main Menu Function&lt;/span&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;menu&lt;/span&gt;()
{
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; BoardSize; i&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
	{
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; j &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; BoardSize; j&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
		{
			board[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0044dd;&quot;&gt;&#39;\0&#39;&lt;/span&gt;;
		}
	}
	system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
	&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; choice;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;Tic Tac Toe Game&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;1.Human Player VS Human Player&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;2.Human Player VS Computer&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;3.Exit&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cin &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; choice;
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;switch&lt;/span&gt; (choice)
	{
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;:
		printBoard();
		p2p();
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;break&lt;/span&gt;;
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;:
		p2c();
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;break&lt;/span&gt;;
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;:
		exit(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;);
	&lt;span style=&quot;color: #997700; font-weight: bold;&quot;&gt;default:&lt;/span&gt;
		cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;Please enter a valid choice(1, 2 or 3)&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
		system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;pause&quot;&lt;/span&gt;);
		menu();
	}
}
&lt;span style=&quot;color: #888888;&quot;&gt;//Function for display board&lt;/span&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;printBoard&lt;/span&gt;()
{
	system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\n\n\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;   1     2     3     4     5   &lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;+-----+-----+-----+-----+-----+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;|     |     |     |     |     |&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;      1 |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;|     |     |     |     |     |&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;

	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;+-----+-----+-----+-----+-----+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;|     |     |     |     |     |&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;      2 |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;|     |     |     |     |     |&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;+-----+-----+-----+-----+-----+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;|     |     |     |     |     |&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;      3 |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;|     |     |     |     |     |&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;+-----+-----+-----+-----+-----+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;|     |     |     |     |     |&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;      4 |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;|     |     |     |     |     |&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;+-----+-----+-----+-----+-----+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;|     |     |     |     |     |&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;      5 |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |  &quot;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;  |&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;|     |     |     |     |     |&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;+-----+-----+-----+-----+-----+&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
}
&lt;span style=&quot;color: #888888;&quot;&gt;//Input Function&lt;/span&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;input&lt;/span&gt;(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; turn)
{
	&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; row, col;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;Please enter Row Number:&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cin &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; row;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;Please enter Column Number:&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	cin &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; col;
	row&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;;
	col&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;;
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (row &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; col &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;)
	{
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (board[row][col] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0044dd;&quot;&gt;&#39;\0&#39;&lt;/span&gt;)
		{
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (turn &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;)
			{
				board[row][col] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player1Move;
				b[row][col] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p1;
			}
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt;
			{
				board[row][col] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
				b[row][col] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
			}
		}
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt;
		{
			cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;This Cell is already fill&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
			input(turn);
		}
	}
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt;
	{
		cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;Please enter an Valid cell Number&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
		input(turn);
	}
}

&lt;span style=&quot;color: #888888;&quot;&gt;//Player1 Turn Function&lt;/span&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;inline&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;player1&lt;/span&gt;()
{
	system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
	printBoard();
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;Player1 [X] Your Turn&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	input(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;);
}
&lt;span style=&quot;color: #888888;&quot;&gt;//Player2 Function&lt;/span&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;inline&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;player2&lt;/span&gt;()
{
	system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
	printBoard();
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;Player2 [O] Your Turn&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	input(&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;);
}
&lt;span style=&quot;color: #888888;&quot;&gt;//Player VS Player Game Funcation&lt;/span&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;inline&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;p2p&lt;/span&gt;()
{
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;13&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
	{
		player1();
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;)
		{
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (check())
			{
				system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
				printBoard();
				cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;Congrats!! Player1 Won the Game!!&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
				cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
				system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;pause&quot;&lt;/span&gt;);
				menu();
			}
		}
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (i &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;12&lt;/span&gt;)
		{
			system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
			printBoard();
			cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;Oopss!! Game Drawn!!&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
			system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;pause&quot;&lt;/span&gt;);
			menu();
		}
		player2();
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;)
		{
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (check())
			{
				system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
				printBoard();
				cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;Congrats!! Player2 Won the Game!!&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
				cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
				system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;pause&quot;&lt;/span&gt;);
				menu();
			}
		}

	}
}
&lt;span style=&quot;color: #888888;&quot;&gt;//Check the Status Of Game&lt;/span&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;bool&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;check&lt;/span&gt;()
{
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
	{
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; ((board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; &lt;span style=&quot;color: #0044dd;&quot;&gt;&#39;\0&#39;&lt;/span&gt;) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;]) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;]) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;]) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;]) &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; (board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; &lt;span style=&quot;color: #0044dd;&quot;&gt;&#39;\0&#39;&lt;/span&gt;) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i]) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i]) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i]) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][i]))
		{
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
		}
	}
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; ((board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; &lt;span style=&quot;color: #0044dd;&quot;&gt;&#39;\0&#39;&lt;/span&gt;) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;]) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;]) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;]) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;]))
	{
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
	}
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; ((board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; &lt;span style=&quot;color: #0044dd;&quot;&gt;&#39;\0&#39;&lt;/span&gt;) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;]) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;]) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;]) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;]))
	{
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
	}
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt;
	{
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;false&lt;/span&gt;;
	}
}
&lt;span style=&quot;color: #888888;&quot;&gt;//defend function for Computer&lt;/span&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;bool&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;defend&lt;/span&gt;(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; comp, &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; player, &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; brd)
{
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (brd &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;)
	{
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;false&lt;/span&gt;;
	}
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;*&lt;/span&gt; comp &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player)
	{
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
		{
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
			{
				b[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
				board[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
			}
		}
	}
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;*&lt;/span&gt; comp &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player)
	{
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
		{
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
			{
				b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
				board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
			}
		}
	}
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt;
	{
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
		{
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;*&lt;/span&gt; comp &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; j &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; j&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
				{
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
					{
						b[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
						board[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
					}
				}
			}
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;*&lt;/span&gt; comp &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;!=&lt;/span&gt; player)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; j &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; j&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
				{
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[j][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
					{
						b[j][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
						board[j][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
					}
				}
			}
		}
	}
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;false&lt;/span&gt;;
}
&lt;span style=&quot;color: #888888;&quot;&gt;//attack -- take a move as to win in future&lt;/span&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;bool&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;attack&lt;/span&gt;()
{
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;*&lt;/span&gt; p1)
	{
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
		{
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (i &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;)
				{
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; j &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; j&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
					{
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
						{
							b[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
							board[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
							&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
						}
					}
				}
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt;
				{
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; j &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; j&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
					{
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
						{
							b[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
							board[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
							&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
						}
					}
				}
			}
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (i &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;)
				{
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; j &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; j&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
					{
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[j][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
						{
							b[j][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
							board[j][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
							&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
						}
					}
				}
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt;
				{
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; j &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; j&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
					{
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[j][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
						{
							b[j][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
							board[j][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
							&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
						}
					}
				}
			}
		}
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2)
		{
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; ((b[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; ((b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2)) &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; ((b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2))))
				{
					b[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
					board[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
				}
			}
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
				{
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (((b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1)) &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; ((b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1))))
					{
						b[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
						board[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
					}
				}
			}
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
				{
					b[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
					board[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
				}
			}
		}
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2)
		{
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; ((b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2)) &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; ((b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2))))
				{
					b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
					board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
				}
			}
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
				{
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (((b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1)) &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; ((b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1))))
					{
						b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
						board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
					}
				}
			}
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
				{
					b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
					board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
				}
			}
		}
	}
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt;
	{
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt;(b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt;b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;]&lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt;p2 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2))
		{
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; ((b[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; ((b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2)) &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; ((b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2))))
				{
					b[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
					board[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
				}
			}
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
				{
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (((b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1)) &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; ((b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1))))
					{
						b[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
						board[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
					}
				}
			}
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
				{
					b[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
					board[i][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
				}
			}
		}
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2)
		{
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; ((b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2)) &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; ((b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2))))
				{
					b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
					board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
				}
			}
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
				{
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (((b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1)) &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; ((b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1))))
					{
						b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
						board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
					}
				}
			}
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
				{
					b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
					board[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;-&lt;/span&gt; i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
				}
			}
		}
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt;
		{
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[i][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2)
				{
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (i &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;)
					{
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; j &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; j&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
						{
							&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
							{
								b[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
								board[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
								&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
							}
						}
					}
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt;
					{
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; j &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; j&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
						{
							&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
							{
								b[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
								board[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
								&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
							}
						}
					}
				}
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p2)
				{
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (i &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;3&lt;/span&gt;)
					{
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; j &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; j&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
						{
							&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[j][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
							{
								b[j][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
								board[j][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
								&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
							}
						}
					}
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt;
					{
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;; j &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; j&lt;span style=&quot;color: #333333;&quot;&gt;--&lt;/span&gt;)
						{
							&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[j][i] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
							{
								b[j][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
								board[j][i] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
								&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;true&lt;/span&gt;;
							}
						}
					}
				}
			}
		}
	}
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #007020;&quot;&gt;false&lt;/span&gt;;
}
&lt;span style=&quot;color: #888888;&quot;&gt;//Computer Moves&lt;/span&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;computerMoves&lt;/span&gt;(&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; x)
{
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #333333;&quot;&gt;!&lt;/span&gt;defend(p2, p1, x))
	{
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #333333;&quot;&gt;!&lt;/span&gt;defend(p1, p2, x))
		{
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; ((b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; p2 &lt;span style=&quot;color: #333333;&quot;&gt;||&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; p1 &lt;span style=&quot;color: #333333;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;*&lt;/span&gt; p2) &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;+=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;)
				{
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; j &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; j &lt;span style=&quot;color: #333333;&quot;&gt;+=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;)
					{
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
						{
							b[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
							board[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
							&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;goto&lt;/span&gt; end;
						}
					}
				}
			}
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (x &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
			{
				b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
				board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;goto&lt;/span&gt; end;
			}
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #333333;&quot;&gt;!&lt;/span&gt;attack())
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (x &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
				{
					&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;time_t&lt;/span&gt; seconds;
					time(&lt;span style=&quot;color: #333333;&quot;&gt;&amp;amp;&lt;/span&gt;seconds);
					srand((&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt;)seconds);
					&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i, j;
					i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; (rand() &lt;span style=&quot;color: #333333;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;) &lt;span style=&quot;color: #333333;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;;
					j &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; (rand() &lt;span style=&quot;color: #333333;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;) &lt;span style=&quot;color: #333333;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;4&lt;/span&gt;;
					b[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
					board[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
				}
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
				{
					b[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
					board[&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;][&lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
				}
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;else&lt;/span&gt;
				{
					&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; i&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
					{
						&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; j &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; j &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;5&lt;/span&gt;; j&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;)
						{
							&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (b[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;)
							{
								b[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; p2;
								board[i][j] &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; Player2Move;
								&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;goto&lt;/span&gt; end;
							}
						}
					}
				}
			}
		}
	}
&lt;span style=&quot;color: #997700; font-weight: bold;&quot;&gt;end:&lt;/span&gt;
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; endl;
}
&lt;span style=&quot;color: #888888;&quot;&gt;//Player VS Computer Funcation&lt;/span&gt;
&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;color: #0066bb; font-weight: bold;&quot;&gt;p2c&lt;/span&gt;()
{
	system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
	cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\n\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;You wanna go 1st or 2nd(1 or 2)&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
	&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; choice;
	cin &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; choice;
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;switch&lt;/span&gt; (choice)
	{
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;:
		cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;Your symbol is X and Computer&#39;s symbol is O&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
		cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
		system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;pause&quot;&lt;/span&gt;);
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;25&lt;/span&gt;;)
		{
			system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
			printBoard();
			input(p1);
			system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
			printBoard();
			i&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;;
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;8&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (check())
				{
					system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
					printBoard();
					cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;Congrats!! You Won the Game!!&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
					cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
					system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;pause&quot;&lt;/span&gt;);
					menu();
				}
			}
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;24&lt;/span&gt;)
			{
				system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
				printBoard();
				cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;Oopss!! Game Drawn!!&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
				system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;pause&quot;&lt;/span&gt;);
				menu();
			}
			computerMoves(i);
			system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
			printBoard();
			i&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;;
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;9&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (check())
				{
					system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
					printBoard();
					cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;\Oopss!! Computer Won the Game!!&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
					cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
					system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;pause&quot;&lt;/span&gt;);
					menu();
				}
			}
		}
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;break&lt;/span&gt;;
	&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;2&lt;/span&gt;:
	{
		p2 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;1&lt;/span&gt;;
		p1 &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; choice;
		Player1Move &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0044dd;&quot;&gt;&#39;O&#39;&lt;/span&gt;;
		Player2Move &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0044dd;&quot;&gt;&#39;X&#39;&lt;/span&gt;;

		cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;Your symbol is O and Computer&#39;s symbol is X&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
		cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
		system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;pause&quot;&lt;/span&gt;);
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;for&lt;/span&gt; (&lt;span style=&quot;color: #333399; font-weight: bold;&quot;&gt;int&lt;/span&gt; i &lt;span style=&quot;color: #333333;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;0&lt;/span&gt;; i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;25&lt;/span&gt;;)
		{
			system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
			printBoard();
			computerMoves(i);
			system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
			printBoard();
			i&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;;
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;8&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (check())
				{
					system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
					printBoard();
					cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;\Oopss!! Computer Won the Game!!&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
					cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
					system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;pause&quot;&lt;/span&gt;);
					menu();
				}
			}
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;24&lt;/span&gt;)
			{
				system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
				printBoard();
				cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;Oopss!! Game Drawn!!&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
				system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;pause&quot;&lt;/span&gt;);
				menu();
			}
			input(p2);
			system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
			printBoard();
			i&lt;span style=&quot;color: #333333;&quot;&gt;++&lt;/span&gt;;
			&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (i &lt;span style=&quot;color: #333333;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #0000dd; font-weight: bold;&quot;&gt;9&lt;/span&gt;)
			{
				&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;if&lt;/span&gt; (check())
				{
					system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;CLS&quot;&lt;/span&gt;);
					printBoard();
					cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;Congrats!! You Won the Game!!&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
					cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n\t\t\t\t&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;&lt;/span&gt;;
					system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;pause&quot;&lt;/span&gt;);
					menu();
				}
			}
		}
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;break&lt;/span&gt;;

	}
	&lt;span style=&quot;color: #997700; font-weight: bold;&quot;&gt;default:&lt;/span&gt;
		cout &lt;span style=&quot;color: #333333;&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;Invalid Input..!!&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0; color: #666666; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;background-color: #fff0f0;&quot;&gt; &quot;&lt;/span&gt;;
		system(&lt;span style=&quot;background-color: #fff0f0;&quot;&gt;&quot;pause&quot;&lt;/span&gt;);
		p2c();
		&lt;span style=&quot;color: #008800; font-weight: bold;&quot;&gt;break&lt;/span&gt;;
	}
}
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;

  &lt;br /&gt; 
  &lt;br /&gt; &lt;br /&gt; Check more c++ examples here&lt;a href=&quot;https://fahad-cprogramming.blogspot.com/p/c-simple-examples.html&quot; target=&quot;_blank&quot;&gt; C++ Simple Examples&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/7149599761142462517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2019/12/tic-tac-toe-game-c-source-code.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/7149599761142462517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/7149599761142462517'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2019/12/tic-tac-toe-game-c-source-code.html' title='Tic Tac Toe c++ game project source code and documentation'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-7001975200174235819</id><published>2018-08-11T17:35:00.001-07:00</published><updated>2018-08-11T17:35:38.162-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="solutions"/><title type='text'>Looking for a website for IT solutions?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Many of the times we think there should be a website which have different types of solutions. Why?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;For example we like a blog/website due to&lt;/span&gt;&lt;br /&gt;


&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Its content&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Author writing tone&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Design&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;To the point content no long stories&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;And we get addicted to this web or blog. Let a website contains solutions about frontend development only. Its author is a gem and explains very well for you and you get your solutions quickly.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;At the same time there is another website which has backend programming solutions but you get its explanation after digging out more and more. So you will like first author have backend solutions too?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Yes here is the website &lt;a href=&quot;https://solutionspirit.com/&quot;&gt;SolutionSpirit.com&lt;/a&gt;&amp;nbsp;which does this it has vast covering solutions categories.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;img alt=&quot;programming solutions all in on site&quot; border=&quot;0&quot; data-original-height=&quot;872&quot; data-original-width=&quot;848&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-iNNevXEUidhULGVs-nKIbidUowfK9ffFkTzmBW5Z7VUArEdx1vK9ZHdJiTL4z9LAbB5n0OdLpQZOJ2FzwsTmw68n-BZoEHbqOhRlsLhwdoD66p7mtCsCHu-pwbSp05rxciCGFXb9wfZ3/s400/solutions_categories.png&quot; title=&quot;solutions categories&quot; width=&quot;388&quot; /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;If you are an android developer mush check their android solutions category. Like &lt;a href=&quot;https://solutionspirit.com/on-scrolling-recyclerview-change-values/&quot;&gt;scrolling recycler view making items shuffle incorrectly&lt;/a&gt;&amp;nbsp;is to the point explained.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;After reading their about us page it feels they are fully dedicated to provide the best solutions in super easy way and their content proves that too.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Design&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Its simple clean and focus on the content no extra design to&amp;nbsp;disturb your attention&amp;nbsp;towards content. And&amp;nbsp;currently they&amp;nbsp;don&#39;t have ads on their site but a donate button. They&amp;nbsp;should have fewer ads to keep there sources up and running hope they will.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;How about&amp;nbsp;quality of solutions?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Well the solutions&amp;nbsp;I found on their site is worth for the beginners and for the&amp;nbsp;experience person as well. There is an example&amp;nbsp;I my self working on android faced a&amp;nbsp;problem about recycle view after too many hours of searching here and there&amp;nbsp;I found a solution but not&amp;nbsp;efficient in the above link the described the best way of the problem by overriding methods of adapter.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;As a whole they did an excellent job by making&amp;nbsp;live a site like solutionSpirit.com&amp;nbsp;I&amp;nbsp;wish them best of luck and keep solving the problems of others.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/7001975200174235819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2018/08/looking-for-website-for-it-solutions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/7001975200174235819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/7001975200174235819'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2018/08/looking-for-website-for-it-solutions.html' title='Looking for a website for IT solutions?'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-iNNevXEUidhULGVs-nKIbidUowfK9ffFkTzmBW5Z7VUArEdx1vK9ZHdJiTL4z9LAbB5n0OdLpQZOJ2FzwsTmw68n-BZoEHbqOhRlsLhwdoD66p7mtCsCHu-pwbSp05rxciCGFXb9wfZ3/s72-c/solutions_categories.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-578641524957207274</id><published>2018-06-14T20:58:00.000-07:00</published><updated>2018-06-14T21:22:38.966-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="assignment"/><category scheme="http://www.blogger.com/atom/ns#" term="help"/><category scheme="http://www.blogger.com/atom/ns#" term="online"/><category scheme="http://www.blogger.com/atom/ns#" term="solution"/><title type='text'>Do My Assignment for Me Requests Picked up &amp; Dealt with Ease! </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz_-6_A49P7iGtxRyrz0q5dE83jlp78pjiigT3Eq-GJSnd7wu5y4GcTsJwp4ERfWAkeuBzDwmPNgU8i-tCeZ4SJJ4hdpybPSluIY6IUY5QdpglD6asXlQGvTdZqb7pvY-RnbL9V9ECieGv/s640/assing_code.png&quot; /&gt;&lt;br /&gt;&lt;br /&gt;A perfectly matching programming assignment writer with a great track record in a particular area is assigned to check, research and write your project, regardless the complexity level and the deadline.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;When working with a professional programming assignments guru at &lt;a href=&quot;https://www.assigncode.com/&quot;&gt;AssignCode.com&lt;/a&gt;, you’ve got an opportunity to hand in a top quality report or a term paper in a timely manner!&lt;/b&gt; Online procedure requires very little payment and effort from your side.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;When you make a choice to collaborate with the programming assignment helper online, you do the right thing towards academic progress and your career in general. Working hard on every other custom writing assignment in the field, the experts of the company save numerous hours of researching, writing and editing to high school, college and university students.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Entrust your project on JAVA, app development, Python, or any other subject in the computer science to the experienced and qualified academic solutions providers at AssignCode.com and enjoy the range of options offered for both new and regular clients. Stunning performance with every ‘Do my assignment for me, please’ is a must for a moderate price. &lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Pay Someone to Do My Assignment Requests of Any Level Are Welcome!&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;The process of ordering a programming homework assignment from the &lt;b&gt;websites like AssignCode.com is quite simple and quick&lt;/b&gt;. To do this, you have to fill in an online form with the ‘Please, do my assignment for me’ request.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;To get the best online assistance possible, you have to explain, describe and give all additional comments on the key points of the college programming project. Thus, the representative of the website will have a complete understanding of your task, as well as its specifications.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;At the point, the customer of the companies like AssignCode.com should be exceptionally careful. The thing is that the more precise and accurate the project instructions are – the better-researched custom written assignment you’re going to find in your inbox. &lt;br /&gt;&lt;br /&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVE3S912Y2ecuSpAVPcIndQndHYG2wMJxOIYBtmlsW8N1tp2ej2CMc7M7XbWUTAeRlA-M3jidVe4ZAXb7R_ul8DnCYHxJavqWeNRY489yel1d1IMm8Dxj_gn2osTUFnJKxI8YfpO1gDhfZ/s640/assign_code_desc.png&quot; /&gt;&lt;br /&gt;Here are the central features of the programming writing service available at AssignCode.com: &lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;
&lt;li&gt;&lt;b&gt;US Specialists&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;When you provide the company with your ‘I’d like to pay someone to do my assignment, do you have an expert available at the moment?’ request, you’re provided with an opportunity to co-work with someone, who has the relevant experience to solve the problems of your academic level.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;The websites like AssignCode.com, where professional programming assistance is offered for relatively cheap prices, recruit native English speakers, &lt;b&gt;who have proven experience needed to accomplish a good looking paper free from any sort of errors&lt;/b&gt;. Every candidate is properly evaluated before becoming a part of the company staff.&lt;br /&gt;&lt;br /&gt;&lt;img border=&quot;0&quot; height=&quot;407&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1V7ScbmuE4nn8TfNgaeqLTuWveFZ0B7kp6c8bd4lh1lxb_UQKz2kVVGfwlSGjPzkAMiMlMrQhVUT4TdG_Gjp5eZXDVHEEuKAFvB6WUcq-pqvvc0m57V9roD1xIAaaZcN7B4E0yzW7JqS8/s640/Screen+Shot+2018-06-15+at+5.29.27+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;
&lt;li&gt;&lt;b&gt;Complete Confidentiality&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;
Privacy of every client approaching the company for help is the number one priority for AssignCode.com. When you place your ‘I need a competent programming assignment problem solver, who can get my MBA paper done for money’ order, you’re provided with the services based on the solid principles of non-disclosure and privacy. &lt;br /&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b&gt;100% Unique Work&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
Every single project that you buy from the writers of Assign Code company is free from plagiarism and includes all the answers to your particular question.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Every programming paper on JAVA, app development or any other issue is custom written from scratch, so you won’t find the project you purchase from AssignCode.com anywhere else on the web. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://www.assigncode.com/&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVwMvnyvcMmgpivoxCvn71ULGn-uke3iEr8bi9ssUv1Q4QWGSUtXzOKLJ2VdmiiEASpIA3qza5qHMLhzZqeCNpaKGGzSsGRH4SEMvyrUakOiTRQaLdAT8zIYNr2wjiaNTt1cT76ISrrp_h/s640/login_assign_code.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;
&lt;li&gt;&lt;b&gt;Unique Approach&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;
AssignCode.com is a custom writing company, where a team of trusted people know exactly how to write the paper that you need.&lt;/b&gt; The experts of the sites like the one mentioned above have fully dedicated themselves to provide unparalleled experience to every client, who stands behind the ‘I’m assigned with the programming writing task. Will you be there to help me somehow?’ order.  &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/578641524957207274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2018/06/assignments-solution.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/578641524957207274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/578641524957207274'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2018/06/assignments-solution.html' title='Do My Assignment for Me Requests Picked up &amp; Dealt with Ease! '/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz_-6_A49P7iGtxRyrz0q5dE83jlp78pjiigT3Eq-GJSnd7wu5y4GcTsJwp4ERfWAkeuBzDwmPNgU8i-tCeZ4SJJ4hdpybPSluIY6IUY5QdpglD6asXlQGvTdZqb7pvY-RnbL9V9ECieGv/s72-c/assing_code.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-194535006200196035</id><published>2017-11-11T16:01:00.001-08:00</published><updated>2021-03-01T06:08:29.888-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pointers power function"/><category scheme="http://www.blogger.com/atom/ns#" term="power function"/><title type='text'>power function  c++ code using pointers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Write a program in c++ programming that calculates the &lt;b&gt;power of a number using pointers&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;User will input two numbers and program will calculate power. First number will be base and second number will be the power.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;This code explains the following &lt;a href=&quot;https://en.wikipedia.org/wiki/Concepts_(C%2B%2B)&quot;&gt;C++ Concepts&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Functions with the same arguments but different return data types&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;How to use pointers&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Using pointers value to perform an arithmetic operation&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;program prototypes&lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyVVgFof5obuME1TzayXY7bW8J3B2LYOc58-l0TVit93x2mhB7nONP4EnpaZcKTcwrwG_3KNkvGqbLzyeI3dHt0NmGPWMofTgIyzAGQlkWqC4AV37aWTON4IUWKaVagpGCIlOjEYrg-9X-/s1600/cprogramming_power_function_pointer.PNG&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;power function pointers example c++&quot; border=&quot;0&quot; data-original-height=&quot;79&quot; data-original-width=&quot;275&quot; height=&quot;114&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyVVgFof5obuME1TzayXY7bW8J3B2LYOc58-l0TVit93x2mhB7nONP4EnpaZcKTcwrwG_3KNkvGqbLzyeI3dHt0NmGPWMofTgIyzAGQlkWqC4AV37aWTON4IUWKaVagpGCIlOjEYrg-9X-/s400/cprogramming_power_function_pointer.PNG&quot; title=&quot;pointers in c++ examples&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;functions prototypes&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-size: large;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Program has been tested on code blocks c++ complier.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;see also: &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/2017/11/pointer-multiplication-c-example-source.html&quot; target=&quot;_blank&quot;&gt;pointers multiplication example&lt;/a&gt;, &lt;a href=&quot;https://fahad-cprogramming.blogspot.com/2017/10/c-pointer-addition-example.html&quot; target=&quot;_blank&quot;&gt;pointers addition example code&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;program source code:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;#include &amp;lt;iostream&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;


int&lt;/span&gt; Power&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
float&lt;/span&gt; Power1&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
double&lt;/span&gt; Power2&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()

{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter 1st Value:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter 2nd Value:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;...............Power..........&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;The Power of these numbers is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;Power&lt;span class=&quot;operator&quot;&gt;(&amp;amp;&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;,&amp;amp;&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;)&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;The Power of these numbers is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;Power1&lt;span class=&quot;operator&quot;&gt;(&amp;amp;&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;,&amp;amp;&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;)&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;The Power of these numbers is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;Power2&lt;span class=&quot;operator&quot;&gt;(&amp;amp;&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;,&amp;amp;&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;)&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;

 return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;

}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;


int&lt;/span&gt; Power&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;)

{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; P&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;*&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)
 {&lt;/span&gt;
  P&lt;span class=&quot;operator&quot;&gt;=(&lt;/span&gt;P&lt;span class=&quot;operator&quot;&gt; * *&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt; P&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

float&lt;/span&gt; Power1&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;)

{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 float&lt;/span&gt; P&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;*&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)
 {&lt;/span&gt;
  P&lt;span class=&quot;operator&quot;&gt;=(&lt;/span&gt;P&lt;span class=&quot;operator&quot;&gt; * *&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt; P&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

double&lt;/span&gt; Power2&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;)

{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 double&lt;/span&gt; P&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;*&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)
 {&lt;/span&gt;
   P&lt;span class=&quot;operator&quot;&gt;=(&lt;/span&gt;P&lt;span class=&quot;operator&quot;&gt; * *&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt; P&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
program input-output&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJNYQllkf96fU840yqIg1KZC9o21t4MhIZzctZJk4W2fiyUcQcIFEuVP3mHJCniFyThkyi5T6lSKpcPZ_jj005BSv6J1C5broWzbiKSSdcBnZ7roNzf3moRjLtQMP-tUXU2d_qc5jM97Yg/s1600/pointer_power_function_cplusplus_example.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;power function code example pointers c++&quot; border=&quot;0&quot; data-original-height=&quot;144&quot; data-original-width=&quot;360&quot; height=&quot;128&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJNYQllkf96fU840yqIg1KZC9o21t4MhIZzctZJk4W2fiyUcQcIFEuVP3mHJCniFyThkyi5T6lSKpcPZ_jj005BSv6J1C5broWzbiKSSdcBnZ7roNzf3moRjLtQMP-tUXU2d_qc5jM97Yg/s320/pointer_power_function_cplusplus_example.PNG&quot; title=&quot;program output&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;This program will help to clear the concept of functions with different return types.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;It shows the output of 3 functions having the same arguments but different return types.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Besides this, it shows how to use the value with pointers.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;find more examples here: &lt;b&gt;&lt;a href=&quot;http://fahad-cprogramming.blogspot.com/p/c-simple-examples.html&quot; target=&quot;_blank&quot;&gt;c++ examples code&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/194535006200196035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/11/power-function-code-using-pointers-c.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/194535006200196035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/194535006200196035'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/11/power-function-code-using-pointers-c.html' title='power function  c++ code using pointers'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyVVgFof5obuME1TzayXY7bW8J3B2LYOc58-l0TVit93x2mhB7nONP4EnpaZcKTcwrwG_3KNkvGqbLzyeI3dHt0NmGPWMofTgIyzAGQlkWqC4AV37aWTON4IUWKaVagpGCIlOjEYrg-9X-/s72-c/cprogramming_power_function_pointer.PNG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-7249167383281985345</id><published>2017-11-08T15:38:00.003-08:00</published><updated>2021-03-01T06:14:40.896-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pointers"/><category scheme="http://www.blogger.com/atom/ns#" term="pointers multiplication"/><title type='text'>pointer multiplication c++ example source code</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Write a program in c++ programming to &lt;b&gt;multiply two numbers using pointers&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Make a function for multiplication that takes input from the user.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;There should be three functions and each should return a different data type int, float and double.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Prototypes for functions are&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimtHe4Bp7Lyci4xHw5ABnUDskZJ4aYOSuipd6P1ENIuNgwnXjVLNy0JyUR4quEHegfcvNvSt7L8Jzg58gma_2RXo0J9lGFNzZRUDzpcQGEcLxSyOZW3cOhmrRIbJnEOddpE54Q4f8K31Z4/s1600/cprogramming_pointer_example_multiplication.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;simple pointer multiplication example c++ code&quot; border=&quot;0&quot; data-original-height=&quot;88&quot; data-original-width=&quot;249&quot; height=&quot;141&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimtHe4Bp7Lyci4xHw5ABnUDskZJ4aYOSuipd6P1ENIuNgwnXjVLNy0JyUR4quEHegfcvNvSt7L8Jzg58gma_2RXo0J9lGFNzZRUDzpcQGEcLxSyOZW3cOhmrRIbJnEOddpE54Q4f8K31Z4/s400/cprogramming_pointer_example_multiplication.PNG&quot; title=&quot;prototypes&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;This program has been tested on c++ code blocks IDE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;C++ source code:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;see also: &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/2017/10/c-pointer-addition-example.html&quot; target=&quot;_blank&quot;&gt;pointer addition example source code&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;#include &amp;lt;iostream&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

int&lt;/span&gt; Mult&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
float&lt;/span&gt; Mult1&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
double&lt;/span&gt; Mult2&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(){&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

    int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter 1st Value:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter 2nd Value:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;...............Multiplication..........&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;The integer Multiplication of these numbers is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;Mult&lt;span class=&quot;operator&quot;&gt;(&amp;amp;&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;,&amp;amp;&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;)&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;The float Multiplication of these numbers is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;Mult1&lt;span class=&quot;operator&quot;&gt;(&amp;amp;&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;,&amp;amp;&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;)&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;The double Multiplication of these numbers is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;Mult2&lt;span class=&quot;operator&quot;&gt;(&amp;amp;&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;,&amp;amp;&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;)&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

int&lt;/span&gt; Mult&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; Prod&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 Prod&lt;span class=&quot;operator&quot;&gt;=(*&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt; * *&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt; Prod&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

float&lt;/span&gt; Mult1&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 float&lt;/span&gt; Prod&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 Prod&lt;span class=&quot;operator&quot;&gt;=(*&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt; * *&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt; Prod&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

double&lt;/span&gt; Mult2&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;){&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 double&lt;/span&gt; Prod&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 Prod&lt;span class=&quot;operator&quot;&gt;=(*&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt; * *&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt; Prod&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
Program input-output&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5KVAxkGVONTDLp_YmFv1X_zhM8wh563bIR2NGI6uNuu618CC6d2eFmk3cBLx-WWE9ykWKB9MjrSWfKzW1HCaR79mx6ygP16Z_rD0_ryXwZQQlRVtgoCDz84E2dnL8lxD0-KnbOPdXOlIu/s1600/pointer_multiplication_cplusplus_example.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c++ simple pointer multiplication example source code&quot; border=&quot;0&quot; data-original-height=&quot;225&quot; data-original-width=&quot;434&quot; height=&quot;206&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5KVAxkGVONTDLp_YmFv1X_zhM8wh563bIR2NGI6uNuu618CC6d2eFmk3cBLx-WWE9ykWKB9MjrSWfKzW1HCaR79mx6ygP16Z_rD0_ryXwZQQlRVtgoCDz84E2dnL8lxD0-KnbOPdXOlIu/s400/pointer_multiplication_cplusplus_example.PNG&quot; title=&quot;c++ pointer multiplication example&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;If you don&#39;t want to write prototypes then just add three methods above the main method.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Suggestion number 1&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;I suggest first remove the prototypes then examine the errors the c++ compiler (IDE) will show. This will help to understand errors also.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Suggestion number 2&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;We have 3 methods with all methods take two integers as arguments. Try by changing argument data types and return types and examine the different cases in which your code is working and not working.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Always keep doing experiments with the code for fast learning.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Each and every time you face an error you learn.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;Read also: &lt;a href=&quot;https://fahad-cprogramming.blogspot.com/p/c-simple-examples.html&quot; target=&quot;_blank&quot;&gt;c++ programming simple examples&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/7249167383281985345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/11/pointer-multiplication-c-example-source.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/7249167383281985345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/7249167383281985345'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/11/pointer-multiplication-c-example-source.html' title='pointer multiplication c++ example source code'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimtHe4Bp7Lyci4xHw5ABnUDskZJ4aYOSuipd6P1ENIuNgwnXjVLNy0JyUR4quEHegfcvNvSt7L8Jzg58gma_2RXo0J9lGFNzZRUDzpcQGEcLxSyOZW3cOhmrRIbJnEOddpE54Q4f8K31Z4/s72-c/cprogramming_pointer_example_multiplication.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-5984022944718671915</id><published>2017-10-03T14:50:00.001-07:00</published><updated>2021-03-01T06:20:20.801-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pointers"/><title type='text'>c++ pointer addition example</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Write a c++ program that calculates the&amp;nbsp;&lt;b&gt;addition of two numbers using pointers&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Program has three functions receiving two-pointers reference.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Three functions return int, float and double sum of numbers.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;This c++ tutorial uses the following concepts.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;pointers in c++&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;functions&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;passing reference to a function&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;This code has been tested on code blocks c++ compiler&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;C++ source code&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;#include &amp;lt;iostream&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

int&lt;/span&gt; Sum&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
float&lt;/span&gt; Sum1&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
double&lt;/span&gt; Sum2&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;


int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()

{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;


 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter 1st Value:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter 2nd Value:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;...............ADDITION..............&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;The integer sum of these numbers is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;Sum&lt;span class=&quot;operator&quot;&gt;(&amp;amp;&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;,&amp;amp;&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;)&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;The float sum of these numbers is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;Sum1&lt;span class=&quot;operator&quot;&gt;(&amp;amp;&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;,&amp;amp;&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;)&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;The double sum of these numbers is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;Sum2&lt;span class=&quot;operator&quot;&gt;(&amp;amp;&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;,&amp;amp;&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;)&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;


 return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;

}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;


int&lt;/span&gt; Sum&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt; )

{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; sum&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 sum&lt;span class=&quot;operator&quot;&gt;=(*&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt; + *&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt; sum&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

float&lt;/span&gt; Sum1&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt; )

{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 float&lt;/span&gt; sum&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 sum&lt;span class=&quot;operator&quot;&gt;=(*&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt; + *&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt; sum&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

double&lt;/span&gt; Sum2&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt; )
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 double&lt;/span&gt; sum&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 sum&lt;span class=&quot;operator&quot;&gt;=(*&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt; + *&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt; sum&lt;span class=&quot;operator&quot;&gt;;

}&lt;/span&gt;

&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Input-output of code&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsdk1g8gMgBtlFsGDyUS6lOlA2GP0_nSmCAdIcWNTuiIVjd0yN53Q8QENbKFKwh5501og6Pm7UJqJLQvUfxtUpUJekwAGgOwjF4XHWH3BKDnTeqRcUvDE157OTNWwxaubJeP_NWYSSFzsc/s1600/c_pointer_example_additon.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c++ pointer example to add two numbers&quot; border=&quot;0&quot; data-original-height=&quot;275&quot; data-original-width=&quot;431&quot; height=&quot;204&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsdk1g8gMgBtlFsGDyUS6lOlA2GP0_nSmCAdIcWNTuiIVjd0yN53Q8QENbKFKwh5501og6Pm7UJqJLQvUfxtUpUJekwAGgOwjF4XHWH3BKDnTeqRcUvDE157OTNWwxaubJeP_NWYSSFzsc/s320/c_pointer_example_additon.PNG&quot; title=&quot;c++ pointer example outpot&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
addition functions&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeaB48LDFPUScqADy4eCGuksAZV1T3X_ilGXAlqpYzhxCd_0XxOesNcoVJedcB5UW1qYb-5x-VAPuHVITLV-trzX-0XaLLHgMvITh38cUorLvax8-X2JzDqVuEra5U8wWVgLBxixuVkAU8/s1600/addtion_functions_cplusplus.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;two number additions using pointers in c++ programming&quot; border=&quot;0&quot; data-original-height=&quot;475&quot; data-original-width=&quot;443&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeaB48LDFPUScqADy4eCGuksAZV1T3X_ilGXAlqpYzhxCd_0XxOesNcoVJedcB5UW1qYb-5x-VAPuHVITLV-trzX-0XaLLHgMvITh38cUorLvax8-X2JzDqVuEra5U8wWVgLBxixuVkAU8/w372-h400/addtion_functions_cplusplus.PNG&quot; title=&quot;addition functions&quot; width=&quot;372&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Find more here&lt;i&gt;:&lt;/i&gt;&amp;nbsp;&lt;a href=&quot;http://fahad-cprogramming.blogspot.com/p/c-simple-examples.html&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;c++ examples with output&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;a href=&quot;https://gist.github.com/fahadcprogramming/9b392cf6896da2c5e5aeb6016a2d7c04&quot; target=&quot;_blank&quot;&gt;github source&lt;/a&gt; &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/5984022944718671915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/10/c-pointer-addition-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/5984022944718671915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/5984022944718671915'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/10/c-pointer-addition-example.html' title='c++ pointer addition example'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsdk1g8gMgBtlFsGDyUS6lOlA2GP0_nSmCAdIcWNTuiIVjd0yN53Q8QENbKFKwh5501og6Pm7UJqJLQvUfxtUpUJekwAGgOwjF4XHWH3BKDnTeqRcUvDE157OTNWwxaubJeP_NWYSSFzsc/s72-c/c_pointer_example_additon.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-6917390336157440982</id><published>2017-09-26T09:32:00.003-07:00</published><updated>2021-03-01T06:24:45.337-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="count spaces"/><category scheme="http://www.blogger.com/atom/ns#" term="pointers"/><category scheme="http://www.blogger.com/atom/ns#" term="string function"/><title type='text'>c++ program to count spaces in a string using pointers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Write a c++ program that calculates a number of &lt;b&gt;spaces in a string using pointers&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Make a separate function that takes a pointer then using for loop it calculates all spaces.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;This example covers the concept of&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;pointers in c++&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;functions&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://fahad-cprogramming.blogspot.com/2012/10/loops-in-c-while-loop.html&quot; target=&quot;_blank&quot;&gt;loops in c++&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;C++ source code&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;#include &amp;lt;iostream&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; Calculate_Spaces_alpha&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt; string&lt;span class=&quot;operator&quot;&gt; [] =&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;This string contains four spaces&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;String is &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\n%----------------------%\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; string&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;str&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; string&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 Calculate_Spaces_alpha&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;str&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

void&lt;/span&gt; Calculate_Spaces_alpha&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;ptr&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; spaces&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; characters&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ( ; ;&lt;/span&gt; ptr&lt;span class=&quot;operator&quot;&gt;++)
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (*&lt;/span&gt;ptr&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39; &#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
   spaces&lt;span class=&quot;operator&quot;&gt;++;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;

  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (*&lt;/span&gt;ptr&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;\0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
   characters&lt;span class=&quot;operator&quot;&gt;++;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else
   break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\nIn the String: &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Characters:  &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; characters&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Spaces:  &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; spaces&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;This code has been tested on the c++ Code blocks compiler&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
code view&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcs8ki0Hcev74l1ZHZ79JMoVAY4Y6APHDUaw68YFBRLW5XP9GGu2c6Bb4Rtyxe2iBrBrIX_AtGHFJ_98mBs3XoZZcL2eEmHt7YwBLHBRJN8M-Ka9j4Mt8NNkywfgYFW6oldFGxtZ3HhAUB/s1600/pointers_cplusplus_example_string.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;count spaces in a string c++ program source code&quot; border=&quot;0&quot; data-original-height=&quot;475&quot; data-original-width=&quot;892&quot; height=&quot;339&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcs8ki0Hcev74l1ZHZ79JMoVAY4Y6APHDUaw68YFBRLW5XP9GGu2c6Bb4Rtyxe2iBrBrIX_AtGHFJ_98mBs3XoZZcL2eEmHt7YwBLHBRJN8M-Ka9j4Mt8NNkywfgYFW6oldFGxtZ3HhAUB/w640-h339/pointers_cplusplus_example_string.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;also check more examples here: &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/p/c-simple-examples.html&quot; target=&quot;_blank&quot;&gt;C++ Example Source Codes&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/6917390336157440982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/09/pointer-example-cplusplus-count-string-spaces.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/6917390336157440982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/6917390336157440982'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/09/pointer-example-cplusplus-count-string-spaces.html' title='c++ program to count spaces in a string using pointers'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcs8ki0Hcev74l1ZHZ79JMoVAY4Y6APHDUaw68YFBRLW5XP9GGu2c6Bb4Rtyxe2iBrBrIX_AtGHFJ_98mBs3XoZZcL2eEmHt7YwBLHBRJN8M-Ka9j4Mt8NNkywfgYFW6oldFGxtZ3HhAUB/s72-w640-h339-c/pointers_cplusplus_example_string.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-7854901071059171833</id><published>2017-09-07T12:57:00.000-07:00</published><updated>2017-09-07T12:57:26.958-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="assignment"/><category scheme="http://www.blogger.com/atom/ns#" term="cplusplus"/><category scheme="http://www.blogger.com/atom/ns#" term="solution"/><title type='text'>Experts to rely on when you stuck with programming</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Since nowadays there are plenty of high-paid career opportunities in the IT and Software Engineering spheres worldwide, many young people are committed to gaining a degree in Computer Science. However, entering a college or university, they can hardly imagine how complicated and time-consuming their homework may appear over time. And when it comes to combining that homework with assignments in other subjects, students quickly get tired, frustrated, and unwilling to do any kind of work. As a result, they either skip some tasks and burn the midnight oil doing the most important ones or turn to help to put a part of their burden on somebody else’s shoulders. Fortunately or not, sometimes the latter helps the most.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: large;&quot;&gt;Service to use when programming becomes a headache&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0b5394; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;One of the number of services throughout the internet to provide the students with homework assistance is&amp;nbsp;&lt;a href=&quot;https://www.assignmentexpert.com/programming/cplusplus&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Assignment Expert&lt;/a&gt;&amp;nbsp;which has been strengthening its position in the market for 8 years so far, claiming to have delivered more than 51k tasks. It specializes in Computer Science, Programming, Mathematics, Engineering, Economics and some others and, what’s more, boasts to have 900 qualified and individually tested experts in all disciplines presented on their website, so every task has high chance to be accomplished.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;When the experts accept the task, they promise the customer to accomplish the assignment successfully with a 97% guarantee. Only rare cases show that sometimes misunderstandings may happen during the task processing, but most of them can be easily solved with deposits or compensations. Such high percent of excellently prepared projects is gained due to another special thing about the service that is its quality control team. This is a group of in-office experts and members of the support team who control the actual process of doing any kind of homework 24/7 and keep in touch with the customers online all the time.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;The success of the company also lies in a fair system of task evaluation where the price of every task is budget-friendly and depends on the thorough examination of the factors like the level of difficulty, volume, and deadline set in the requirements by the customer.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0b5394; font-size: large;&quot;&gt;Computer Science as a major branch of Assignment Expert&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Programming is one of the most popular АЕ’s specializations; the team of developers work with a large number of languages, technologies and Integrated Development Environments that are used in studying of Programming and creation of business offers. C/C++, Java, and Python branches embrace all kinds of assignments from the easiest basic tasks to big projects like, for example, implementation of PageRank algorithm, grid and parallel computing, FTP clients/servers, etc. A wide range of tasks deal with databases, web design and web development.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Programmers engaged in C and C++ often perform the tasks that presuppose implementation of various algorithms while working with data structures and numerical methods. It is the use of abstract data types (like stack or queue), trees, graph algorithms, genetic algorithms and many more. A bunch of tasks go to developing and coding the hierarchy of classes for console games, modeling of the work of the stocks, airports and office applications. For the works to receive the good grades, it&#39;s important to follow the main quality standards, namely modularity, standards of code structuring and variables naming, avoidance of memory leaks and often passing tests. The experts of Assignment Expert test the code with the help of Visual Studio и Valgrind to make sure all results are correct. Besides, clear comments and explanations that follow the code help the customers to better and quicker grasp the topic and feel confident during classes.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;The service constantly checks the clients’ feedback in order to always be able to support, fix, and improve the quality of its work. First year students, for instance, always pay attention to the accompanying documentation (the process of project building, screenshots, purpose of classes and functions, description of complex algorithms from the point of view of the algorithms’ developer) and they are often grateful for the provided material on different websites like Sitejabber.com, “They provided screenshots of it working, even how to compile it. I am simply amazed”. From the reviews, it’s clear that the experts communicate with the customer until the grade is given, “My experience with them has been absolutely top notch. Starting from customer service to getting the assignment done and the follow up support”. The student, therefore, can always be sure in the best result, &quot;I send back my assignment a lot of times. In every time, I find very good cooperation from expert and customer services.&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;It can’t be argued that the number of successful homework tasks is the result of hard work of the professionals of Assignment Expert, independent quality control and experience they got over the years.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/7854901071059171833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/09/experts-to-rely-when-stuck-in-cpp-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/7854901071059171833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/7854901071059171833'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/09/experts-to-rely-when-stuck-in-cpp-programming.html' title='Experts to rely on when you stuck with programming'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-1305949102754006955</id><published>2017-07-22T14:54:00.001-07:00</published><updated>2021-03-01T06:26:33.408-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="class"/><category scheme="http://www.blogger.com/atom/ns#" term="complex"/><category scheme="http://www.blogger.com/atom/ns#" term="cpp code"/><category scheme="http://www.blogger.com/atom/ns#" term="example"/><category scheme="http://www.blogger.com/atom/ns#" term="numbers"/><title type='text'>c++ program for complex numbers using class</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;C++ class for addition, subtraction, multiplication and division for complex numbers&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Class has four functions to perform arithmetic operations. It takes two &lt;b&gt;complex numbers&lt;/b&gt; input from user real and imaginary parts separately.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;The double data type is used to perform all operations. Code tested using c++ CodeBlocks IDE&lt;/span&gt;.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;#include &amp;lt;iostream&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

//**********COMPLEX CLASS************************
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;class&lt;/span&gt; Complex&lt;span class=&quot;operator&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;

private&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 double&lt;/span&gt; real&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;

public&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
 Complex&lt;span class=&quot;operator&quot;&gt;(){&lt;/span&gt;
  real&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
 ///////////////////////////////////////////////////
&lt;/span&gt; Complex&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;double&lt;/span&gt; r&lt;span class=&quot;operator&quot;&gt;){&lt;/span&gt;
  real&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;r&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  imag&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
    ///////////////////////////////////////////////////
&lt;/span&gt; Complex&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;double&lt;/span&gt; r&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; double&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;){&lt;/span&gt;
  real&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;r&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  imag&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
    ///////////////////////////////////////////////////
&lt;/span&gt; Complex&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;Complex&lt;span class=&quot;operator&quot;&gt; &amp;amp;&lt;/span&gt;obj&lt;span class=&quot;operator&quot;&gt;){&lt;/span&gt;
  real&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;obj&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  imag&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;obj&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
    ///////////////////////////////////////////////////
&lt;/span&gt; Complex add&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;Complex c&lt;span class=&quot;operator&quot;&gt;){&lt;/span&gt;
        Complex Add&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  Add&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; real&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  Add&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; imag&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
        return&lt;/span&gt; Add&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
    ///////////////////////////////////////////////////
&lt;/span&gt; Complex sub&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;Complex c&lt;span class=&quot;operator&quot;&gt;){&lt;/span&gt;
  Complex Sub&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  Sub&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; real&lt;span class=&quot;operator&quot;&gt; -&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  Sub&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; imag&lt;span class=&quot;operator&quot;&gt; -&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt; Sub&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
    ///////////////////////////////////////////////////
&lt;/span&gt; Complex mult&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;Complex c&lt;span class=&quot;operator&quot;&gt;){&lt;/span&gt;
        Complex Mult&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  Mult&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; real&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt; -&lt;/span&gt; imag&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  Mult&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; real&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt; -&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt; Mult&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
    ///////////////////////////////////////////////////
&lt;/span&gt; Complex div&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;Complex c&lt;span class=&quot;operator&quot;&gt;){&lt;/span&gt;
  Complex Div&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  Div&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt; = (&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt; imag&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt;)/(&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  Div&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt; = (&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt; real&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt;)/(&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt; Div&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
    ///////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; void&lt;/span&gt; print&lt;span class=&quot;operator&quot;&gt;(){&lt;/span&gt;
        cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;real&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;+&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;imag&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;i&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
    ///////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; double&lt;/span&gt; getReal&lt;span class=&quot;operator&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; const&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt; real&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
    ///////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; double&lt;/span&gt; getImag&lt;span class=&quot;operator&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; const&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt; imag&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
    ///////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; void&lt;/span&gt; setReal&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;double&lt;/span&gt; re&lt;span class=&quot;operator&quot;&gt;){&lt;/span&gt;
  real&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; re&lt;span class=&quot;operator&quot;&gt;;

 }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
    ///////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; void&lt;/span&gt; setImag&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;double&lt;/span&gt; im&lt;span class=&quot;operator&quot;&gt;){&lt;/span&gt;
        imag&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; im&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
 ///////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
};&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

//***************MAIN***************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 double&lt;/span&gt; real1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;imag1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;real2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;imag2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter the Real  part of First Number: &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;real1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter the imaginary  part of First Number: &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;imag1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    Complex obj1&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;real1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;imag1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 obj1&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;print&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;

 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter the Real part of Second Number: &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;real2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter the Imaginary part of second number: &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;imag2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    Complex obj2&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;real2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;imag2&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 obj2&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;print&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;

 Complex c&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 c&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; obj1&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;add&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;obj2&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Addition is : (&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;getReal&lt;span class=&quot;operator&quot;&gt;()&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;)+(&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;getImag&lt;span class=&quot;operator&quot;&gt;()&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;)i&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 c&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; obj1&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;sub&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;obj2&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Subtraction is : (&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;getReal&lt;span class=&quot;operator&quot;&gt;()&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;)+(&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;getImag&lt;span class=&quot;operator&quot;&gt;()&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;)i&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 c&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; obj1&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;mult&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;obj2&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Multiplication is : (&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;getReal&lt;span class=&quot;operator&quot;&gt;()&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;)+(&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;getImag&lt;span class=&quot;operator&quot;&gt;()&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;)i&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 c&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; obj1&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;div&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;obj2&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Division result  is : (&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;getReal&lt;span class=&quot;operator&quot;&gt;()&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;)+(&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;getImag&lt;span class=&quot;operator&quot;&gt;()&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;)i&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
program input-output&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZtnFO4Oiz2xQHiCXkpvApHwK3xeitWtiGWfj_XWUzNLe2Nll4uTp8toHTcWTzJAA2yjrThMTAZIh_UViLn6o7C84TyhMnua_Xjm9rwkfYMzoesslKqk-NgCaWUFNdpj3-DQVMrSl9JnhU/s1600/complex_number_class_example_cpp_programming.PNG&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;complex number class example c++ code&quot; border=&quot;0&quot; data-original-height=&quot;267&quot; data-original-width=&quot;442&quot; height=&quot;241&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZtnFO4Oiz2xQHiCXkpvApHwK3xeitWtiGWfj_XWUzNLe2Nll4uTp8toHTcWTzJAA2yjrThMTAZIh_UViLn6o7C84TyhMnua_Xjm9rwkfYMzoesslKqk-NgCaWUFNdpj3-DQVMrSl9JnhU/s400/complex_number_class_example_cpp_programming.PNG&quot; title=&quot;program input output example&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;program output&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/a4jip1bz3aw/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/a4jip1bz3aw?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Program images&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNHlry2rIPJgJTb_-ipbYppbYFesrsIPcQzpYLNq8m9Qh7PYjfhfEHGZTTB12hJMyX-972nZb0SOeQqjZsJqN27gI40M-5mo6LPdrcR2wh_8_THTOd4bMdv_rJX7OG6awHL-7IjK2USZnk/s1600/complex_number_cpp_class_example1.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;complex number c++ code&quot; border=&quot;0&quot; data-original-height=&quot;393&quot; data-original-width=&quot;560&quot; height=&quot;280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNHlry2rIPJgJTb_-ipbYppbYFesrsIPcQzpYLNq8m9Qh7PYjfhfEHGZTTB12hJMyX-972nZb0SOeQqjZsJqN27gI40M-5mo6LPdrcR2wh_8_THTOd4bMdv_rJX7OG6awHL-7IjK2USZnk/s400/complex_number_cpp_class_example1.PNG&quot; title=&quot;code image&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJsBPvjOT36-iCcTYJBKECSALW7pbOQ3H6m-BlmjxA9PGPTOq-IqLEhxRVgXNBq5FpamDEOcoQs8Ght5VnhdJrcISgBXXlkv3hilo8FDF8VIN0WJy78ZwjZ2qLb-xaYblYxHGDfjI9I3V4/s1600/complex_number_cpp_class_example2.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;complex numbers&quot; border=&quot;0&quot; data-original-height=&quot;460&quot; data-original-width=&quot;578&quot; height=&quot;317&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJsBPvjOT36-iCcTYJBKECSALW7pbOQ3H6m-BlmjxA9PGPTOq-IqLEhxRVgXNBq5FpamDEOcoQs8Ght5VnhdJrcISgBXXlkv3hilo8FDF8VIN0WJy78ZwjZ2qLb-xaYblYxHGDfjI9I3V4/s400/complex_number_cpp_class_example2.PNG&quot; title=&quot;c++ code codeblocks&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir1N9z-y-VTKGqv0P40M_hwyFG-HAp_jamefpv7xZgfuCike7558Y9fMR9-MsOEvaIA3aEyPgxZmwUgf7GdHnt0Il4OHqtqhb5kEHKYEkZtTx_QCbyE40EMOfPfwSg6MLGXcXiZ4uKGEIB/s1600/complex_number_cpp_class_example3.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;complex number c++ program&quot; border=&quot;0&quot; data-original-height=&quot;512&quot; data-original-width=&quot;722&quot; height=&quot;282&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir1N9z-y-VTKGqv0P40M_hwyFG-HAp_jamefpv7xZgfuCike7558Y9fMR9-MsOEvaIA3aEyPgxZmwUgf7GdHnt0Il4OHqtqhb5kEHKYEkZtTx_QCbyE40EMOfPfwSg6MLGXcXiZ4uKGEIB/s400/complex_number_cpp_class_example3.PNG&quot; title=&quot;cplusplus code&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR6KkB3RdYWOBQHWhGwM36LiAkXrvNvKFUy1N_riaO3byPNNE5hJPeqrAxyKhDdlDczOgDSt8kOc1lAV_WOm6oMusBKYxnuOwdkBP0PAo_AciuknRsHYOvPNTEWrHof7Rmhcus4YrbiHE_/s1600/complex_number_cpp_class_example4.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c++ class complex number code&quot; border=&quot;0&quot; data-original-height=&quot;514&quot; data-original-width=&quot;778&quot; height=&quot;263&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR6KkB3RdYWOBQHWhGwM36LiAkXrvNvKFUy1N_riaO3byPNNE5hJPeqrAxyKhDdlDczOgDSt8kOc1lAV_WOm6oMusBKYxnuOwdkBP0PAo_AciuknRsHYOvPNTEWrHof7Rmhcus4YrbiHE_/s400/complex_number_cpp_class_example4.PNG&quot; title=&quot;c++ example code&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;also, find more examples here &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/p/c-simple-examples.html&quot; target=&quot;_blank&quot;&gt;C++ Examples&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/1305949102754006955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/07/complex-numbers-class-cpp-example.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/1305949102754006955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/1305949102754006955'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/07/complex-numbers-class-cpp-example.html' title='c++ program for complex numbers using class'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZtnFO4Oiz2xQHiCXkpvApHwK3xeitWtiGWfj_XWUzNLe2Nll4uTp8toHTcWTzJAA2yjrThMTAZIh_UViLn6o7C84TyhMnua_Xjm9rwkfYMzoesslKqk-NgCaWUFNdpj3-DQVMrSl9JnhU/s72-c/complex_number_class_example_cpp_programming.PNG" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-2715334061433724369</id><published>2017-03-25T18:11:00.001-07:00</published><updated>2021-03-01T06:29:34.337-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++ projects"/><category scheme="http://www.blogger.com/atom/ns#" term="project"/><category scheme="http://www.blogger.com/atom/ns#" term="queue"/><title type='text'>Queue c++ project source code using array, linked list and doubly/circular linked list</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Download C++ project source code for queue implementation using an array, linked list and circular linked list&lt;/span&gt;&lt;/b&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
Each data structure has its own functions. Users can select from the menu for data type selection to build a queue.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
All data structures have basic queue functions. En-queue, De-queue, show front, show queue, etc.&lt;br /&gt;
&lt;br /&gt;
Project source code. It has been tested on Code Blocks C++ IDE.&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;#include&amp;lt;iostream&amp;gt;
#include&amp;lt;windows.h&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
// Queue for array
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; enqueue&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dequeue&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; isfull&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; array_call&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; show&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
const&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; total&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; marks&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;total&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; rear&lt;span class=&quot;operator&quot;&gt; = -&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //rear mean last element of queue
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; front&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;//front mean first element of queue
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; counter&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

// Queue for Linklist
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;struct&lt;/span&gt; list&lt;span class=&quot;operator&quot;&gt;
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; data&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 list&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt; next&lt;span class=&quot;operator&quot;&gt;;
};&lt;/span&gt;
list&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;f&lt;span class=&quot;operator&quot;&gt;, *&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;, *&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;, *&lt;/span&gt;temp&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; linklist_counter&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; linklist_insert&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; linklist_call&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; linklist_dequeu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; linklist_show&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; linklist_front&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; linklist_isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

//Queue for Double Linklist
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;struct&lt;/span&gt; dlist&lt;span class=&quot;operator&quot;&gt; {&lt;/span&gt;
 dlist&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt; prev&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; data&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 dlist&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt; next&lt;span class=&quot;operator&quot;&gt;;
};&lt;/span&gt;
dlist&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;first&lt;span class=&quot;operator&quot;&gt;, *&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;, *&lt;/span&gt;previos&lt;span class=&quot;operator&quot;&gt;, *&lt;/span&gt;tamp&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; dlinklist_counter&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_insert&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_call&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_dequeu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_show&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_front&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
zee&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\t\t\t\t Welcome in Queue  \n 1- Array \n 2- Link List \n 3- Double Link List \n 4- EXIT \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;

 switch&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
  array_call&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; zee&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
  linklist_call&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; zee&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;

  dlinklist_call&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; zee&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 default&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; You enter invalid number PLZ Select again \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; zee&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

// function of Array
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; array_call&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
start&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\t\t\t\t Welcome in Queue with Array&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; input&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\n 1- Enqueu \n 2- Dequeu \n 3- Front\n 4- Show all data \n 5- Exit from Queue in Array \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; input&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 switch&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;input&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
 {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; z&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; z&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; isfull&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;z&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
  int&lt;/span&gt; y&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;//y is input whiich you insert in queue
&lt;/span&gt;  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter you number&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; y&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  enqueue&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Number entered \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Your Queue is full \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 goto&lt;/span&gt; start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;

 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
 {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  dequeue&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Number deleted \n &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Your Queue is Empty \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 goto&lt;/span&gt; start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;

 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
 {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
  int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\n Your front value is &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; marks&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;]&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Your Queue is Empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;

 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
 {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
  int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
   show&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Your Queue is Empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; start&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;

 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 default&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\n You enter invalid Number \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }

}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; enqueue&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; x&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 rear&lt;span class=&quot;operator&quot;&gt; = (&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) %&lt;/span&gt; total&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 marks&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;] =&lt;/span&gt; x&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 counter&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; counter&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dequeue&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
 front&lt;span class=&quot;operator&quot;&gt; = (&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) %&lt;/span&gt; total&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 counter&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; counter&lt;span class=&quot;operator&quot;&gt; -&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; isempty&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;counter&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; isfull&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;counter&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt; total&lt;span class=&quot;operator&quot;&gt;);
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; show&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; j&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; front&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt; &amp;lt;&lt;/span&gt; counter&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;++)
 {&lt;/span&gt;

  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; marks&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;j&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;
  j&lt;span class=&quot;operator&quot;&gt;++;&lt;/span&gt;
  j&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; j&lt;span class=&quot;operator&quot;&gt;%&lt;/span&gt;total&lt;span class=&quot;operator&quot;&gt;;
 }
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

//function of LINK LIST
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; linklist_call&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
linklist_start&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\t\t\t\t Welcome in linklist Queue&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; input&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\n 1- Enqueu \n 2- Dequeu \n 3- show list \n 4- Front\n 5- Exit\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; input&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 switch&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;input&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
  linklist_insert&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Number entered \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; linklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
  linklist_dequeu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; linklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
  linklist_show&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; linklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
  linklist_front&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; linklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 default&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; You enter invalid number &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; linklist_start&lt;span class=&quot;operator&quot;&gt;;
 }
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; linklist_insert&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
 c&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; new&lt;/span&gt; list&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;linklist_counter&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  f&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  p&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Enter data &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  p&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  p&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Enter data&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 c&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 linklist_counter&lt;span class=&quot;operator&quot;&gt;++;
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; linklist_dequeu&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;linklist_counter&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Queue is empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  f&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; f&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  linklist_counter&lt;span class=&quot;operator&quot;&gt;--;&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Number deleted \n &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
 }
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; linklist_show&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; emp&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; linklist_isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;emp&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  temp&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; f&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;temp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt; NULL&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; temp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   temp&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; temp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;
  }&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; temp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Queue is empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; linklist_front&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; emp&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; linklist_isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;emp&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; f&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Queue is empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; linklist_isempty&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;linklist_counter&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

//function of DOUBLE LINK LIST
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; dlinklist_call&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
dlinklist_start&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\t\t\t\t Welcome in Double linklist Queue&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; dinput&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\n 1- Enqueu \n 2- Dequeu \n 3- show list \n 4- Front\n 5- Exit\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; dinput&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 switch&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;dinput&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
  dlinklist_insert&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Number entered \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; dlinklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
  dlinklist_dequeu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Number deleted \n &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; dlinklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
  dlinklist_show&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; dlinklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
  dlinklist_front&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; dlinklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 default&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; You enter invalid number &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; dlinklist_start&lt;span class=&quot;operator&quot;&gt;;
 }
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_insert&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
 current&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; new&lt;/span&gt; dlist&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;dlinklist_counter&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  previos&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; current&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  first&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; current&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;prev&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Enter Data &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  previos&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; current&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;prev&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; previos&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  previos&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; current&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Enter Data &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 dlinklist_counter&lt;span class=&quot;operator&quot;&gt;++;
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_dequeu&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;dlinklist_counter&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Queue is empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  first&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; first&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  dlinklist_counter&lt;span class=&quot;operator&quot;&gt;--;
 }
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_show&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;dlinklist_counter&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Queue is empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  tamp&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; first&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;tamp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt; NULL&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; tamp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   tamp&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; tamp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;
  }&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; tamp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_front&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;dlinklist_counter&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Queue is empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; first&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Project output images.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz2cRhpExGHMHPRDjhplXAXtBwfso1ofkQcxa8uicprAmr0w4oNfIjCpSANif1cUzTsXCVR9T-bihyu4qpiNle5sF_jCsqBek5LX0Yc7QTD_-cQTvO1FdEkt5W5XfxmYe-cxd-5RGgoynk/s1600/Download-Cplusplus-project-source-code.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;download c++ queue project source code&quot; border=&quot;0&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz2cRhpExGHMHPRDjhplXAXtBwfso1ofkQcxa8uicprAmr0w4oNfIjCpSANif1cUzTsXCVR9T-bihyu4qpiNle5sF_jCsqBek5LX0Yc7QTD_-cQTvO1FdEkt5W5XfxmYe-cxd-5RGgoynk/w400-h212/Download-Cplusplus-project-source-code.PNG&quot; title=&quot;c++ queue project&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF3yicKGWpyK8OyOjZDR6nPh8fjilRvPDUSeXnjPczag-PkNjNYpSynLyNjO4JT95A0HUH4yFYLShoESacGNd8qZnh9al8W4lAm8WH1bkJFK6dV9HX_heO3TjE7ZOqxmPi0Pk38KW9xID7/s1600/array-queue-Cplusplus-project-source-code.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;queue using array function&quot; border=&quot;0&quot; height=&quot;168&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF3yicKGWpyK8OyOjZDR6nPh8fjilRvPDUSeXnjPczag-PkNjNYpSynLyNjO4JT95A0HUH4yFYLShoESacGNd8qZnh9al8W4lAm8WH1bkJFK6dV9HX_heO3TjE7ZOqxmPi0Pk38KW9xID7/s400/array-queue-Cplusplus-project-source-code.PNG&quot; title=&quot;queue using array function&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghkId_KO7gz-imPIux7k0phHTPzq4qFLcfoLSH5Y41sAtTpgOjwiHADkWyVbVzyMiZbzXBBeHHwr2ZYLeP8HRVgk_jDp10znbpn4y2SQ12LI4bXIr2S9b8bo2QSYAiKMAdRzNn8-kPUKmj/s1600/doubly-linked-list-queue-Cplusplus-project-source-code.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c++ queue using doubly or circular linked list&quot; border=&quot;0&quot; height=&quot;165&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghkId_KO7gz-imPIux7k0phHTPzq4qFLcfoLSH5Y41sAtTpgOjwiHADkWyVbVzyMiZbzXBBeHHwr2ZYLeP8HRVgk_jDp10znbpn4y2SQ12LI4bXIr2S9b8bo2QSYAiKMAdRzNn8-kPUKmj/s400/doubly-linked-list-queue-Cplusplus-project-source-code.PNG&quot; title=&quot;&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikzXKETbIaF_fyoUfhLCcQBmV8PlFFCCXBFMZ-sMyij0Brinveesi9Vxo-ELSyN-Alrz0FdURbQDBQfvGfKKwR_BlshGgkm8_ClNrnUq8Re98iRfNU4ZPAS30MOjHHfliatbdbfrJCGpQt/s1600/linked+list-queue-Cplusplus-project-source-code.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c++ queue using link list&quot; border=&quot;0&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikzXKETbIaF_fyoUfhLCcQBmV8PlFFCCXBFMZ-sMyij0Brinveesi9Vxo-ELSyN-Alrz0FdURbQDBQfvGfKKwR_BlshGgkm8_ClNrnUq8Re98iRfNU4ZPAS30MOjHHfliatbdbfrJCGpQt/s400/linked+list-queue-Cplusplus-project-source-code.PNG&quot; title=&quot;&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;
Also, find more &lt;a href=&quot;https://fahad-cprogramming.blogspot.com/p/cpp-projects.html&quot; target=&quot;_blank&quot;&gt;c++ simple projects&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/2715334061433724369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/03/queue-c-project-source-code-using-array.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/2715334061433724369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/2715334061433724369'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/03/queue-c-project-source-code-using-array.html' title='Queue c++ project source code using array, linked list and doubly/circular linked list'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz2cRhpExGHMHPRDjhplXAXtBwfso1ofkQcxa8uicprAmr0w4oNfIjCpSANif1cUzTsXCVR9T-bihyu4qpiNle5sF_jCsqBek5LX0Yc7QTD_-cQTvO1FdEkt5W5XfxmYe-cxd-5RGgoynk/s72-w400-h212-c/Download-Cplusplus-project-source-code.PNG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-5728841409121046167</id><published>2017-03-16T14:58:00.001-07:00</published><updated>2021-03-01T06:34:00.942-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="doubly"/><category scheme="http://www.blogger.com/atom/ns#" term="linked"/><category scheme="http://www.blogger.com/atom/ns#" term="list"/><category scheme="http://www.blogger.com/atom/ns#" term="queue"/><title type='text'>doubly linked list queue in c++ source code</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Doubly or circular linked list in c++ programming example using the queue data structure&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;This c++ source code of the queue has four main functions.&lt;br /&gt;
&lt;/span&gt;&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;enqueue&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;dequeue&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;show front&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;show list&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
It uses the concept of functions, pointer, struct and switch, etc..&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;#include&amp;lt;iostream&amp;gt;
#include&amp;lt;windows.h&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

//Queue for Double Linklist
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;struct&lt;/span&gt; dlist&lt;span class=&quot;operator&quot;&gt; {&lt;/span&gt;
	dlist&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt; prev&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
	int&lt;/span&gt; data&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
	dlist&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt; next&lt;span class=&quot;operator&quot;&gt;;
};&lt;/span&gt;
dlist&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;first&lt;span class=&quot;operator&quot;&gt;, *&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;, *&lt;/span&gt;previos&lt;span class=&quot;operator&quot;&gt;, *&lt;/span&gt;tamp&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; dlinklist_counter&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_insert&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_call&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_dequeu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_show&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_front&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
	system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;

    dlinklist_call&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//function of DOUBLE LINK LIST
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; dlinklist_call&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
dlinklist_start&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
	system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
	cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\t\t\t\t Welcome in Double linklist Queue&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
	int&lt;/span&gt; dinput&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
	cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\n 1- Enqueu \n 2- Dequeu \n 3- show list \n 4- Front\n 5- Exit\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
	cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; dinput&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
	switch&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;dinput&lt;span class=&quot;operator&quot;&gt;)
	{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
	case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
		dlinklist_insert&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
		cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Number entered \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
		system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
		goto&lt;/span&gt; dlinklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
	case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
		dlinklist_dequeu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
		cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Number deleted \n &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
		system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
		goto&lt;/span&gt; dlinklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
	case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
		dlinklist_show&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
		goto&lt;/span&gt; dlinklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
	case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
		dlinklist_front&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
		goto&lt;/span&gt; dlinklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
	case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
		break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
	default&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
		cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; You enter invalid number &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
		system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
		goto&lt;/span&gt; dlinklist_start&lt;span class=&quot;operator&quot;&gt;;
	}
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_insert&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
	current&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; new&lt;/span&gt; dlist&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
	if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;dlinklist_counter&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
	{&lt;/span&gt;
		previos&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; current&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
		first&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; current&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
		current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;prev&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
		cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Enter Data &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
		cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
	}&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
	else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
	{&lt;/span&gt;
		previos&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; current&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
		current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;prev&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; previos&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
		previos&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; current&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
		cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Enter Data &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
		cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
	}&lt;/span&gt;
	current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
	dlinklist_counter&lt;span class=&quot;operator&quot;&gt;++;
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_dequeu&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
	if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;dlinklist_counter&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
	{&lt;/span&gt;
		cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Queue is empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
		system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
	}&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
	else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
	{&lt;/span&gt;
		first&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; first&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
		dlinklist_counter&lt;span class=&quot;operator&quot;&gt;--;
	}
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_show&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
	if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;dlinklist_counter&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
	{&lt;/span&gt;
		cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Queue is empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
	}&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
	else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
	{&lt;/span&gt;
		tamp&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; first&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
		while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;tamp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt; NULL&lt;span class=&quot;operator&quot;&gt;)
		{&lt;/span&gt;
			cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; tamp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
			tamp&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; tamp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;
		}&lt;/span&gt;
		cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; tamp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
	}&lt;/span&gt;
	system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dlinklist_front&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
	if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;dlinklist_counter&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
	{&lt;/span&gt;
		cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Queue is empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
	}&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
	else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
	{&lt;/span&gt;
		cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; first&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
	}&lt;/span&gt;
	system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
Program output:&lt;br /&gt;
&lt;/span&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZgcRfFFsgoLhRPjBW0ctAdF5ez-vxfZej7xFZKJ7ubKF_nO5ZW3zpnXXdu9gUrXBquL7t5K3O1qhWExqpgiCe27VxH-61a2b0MLr6XLBP8FkMe948RuvggubWyfxFDYqZRZOw2Uo-8MSh/s1600/doubly_linked_list_queue_cpp_source_code.PNG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;img alt=&quot;doubly linked list queue in c++&quot; border=&quot;0&quot; height=&quot;178&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZgcRfFFsgoLhRPjBW0ctAdF5ez-vxfZej7xFZKJ7ubKF_nO5ZW3zpnXXdu9gUrXBquL7t5K3O1qhWExqpgiCe27VxH-61a2b0MLr6XLBP8FkMe948RuvggubWyfxFDYqZRZOw2Uo-8MSh/s400/doubly_linked_list_queue_cpp_source_code.PNG&quot; title=&quot;doubly linked list queue in c++ program ouput&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;
See also:&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://fahad-cprogramming.blogspot.com/2016/10/array-based-queue-cpp-simple-project.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;linked list queue example source code&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;a href=&quot;https://fahad-cprogramming.blogspot.com/2017/03/queue-implementation-in-c-using-array.html&quot; target=&quot;_blank&quot;&gt;Array based queue implementation source code c++&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/5728841409121046167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/03/doubly-linked-list-queue-in-c-source.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/5728841409121046167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/5728841409121046167'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/03/doubly-linked-list-queue-in-c-source.html' title='doubly linked list queue in c++ source code'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZgcRfFFsgoLhRPjBW0ctAdF5ez-vxfZej7xFZKJ7ubKF_nO5ZW3zpnXXdu9gUrXBquL7t5K3O1qhWExqpgiCe27VxH-61a2b0MLr6XLBP8FkMe948RuvggubWyfxFDYqZRZOw2Uo-8MSh/s72-c/doubly_linked_list_queue_cpp_source_code.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-1813786380639419168</id><published>2017-03-14T14:09:00.003-07:00</published><updated>2021-03-01T06:38:23.574-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="implementation of queue using singly linked list in c++"/><category scheme="http://www.blogger.com/atom/ns#" term="link"/><category scheme="http://www.blogger.com/atom/ns#" term="linked list"/><category scheme="http://www.blogger.com/atom/ns#" term="list"/><category scheme="http://www.blogger.com/atom/ns#" term="queue"/><title type='text'>queue data structure implementation c++ code using linked list</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;C++ program to implement queue data structure using linked list&lt;/b&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;It uses struct, pointers, switch and functions concept. Every queue operation has its own function. User selects its desired operation from the menu.&lt;br /&gt;
It has the following functions&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Enqueue&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Dequeue&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Show front&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Show All&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;    #include&amp;lt;windows.h&amp;gt;
    #include&amp;lt;iostream&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;    using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

    // Queue for Linklist
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;    struct&lt;/span&gt; list&lt;span class=&quot;operator&quot;&gt;
    {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; data&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     list&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt; next&lt;span class=&quot;operator&quot;&gt;;
    };&lt;/span&gt;
    list&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;f&lt;span class=&quot;operator&quot;&gt;, *&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;, *&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;, *&lt;/span&gt;temp&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; linklist_counter&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    void&lt;/span&gt; linklist_insert&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    void&lt;/span&gt; linklist_call&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    void&lt;/span&gt; linklist_dequeu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    void&lt;/span&gt; linklist_show&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    void&lt;/span&gt; linklist_front&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; linklist_isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

    int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
    {&lt;/span&gt;
     linklist_call&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
    }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
    //function of LINK LIST
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;    void&lt;/span&gt; linklist_call&lt;span class=&quot;operator&quot;&gt;()
    {&lt;/span&gt;
    linklist_start&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
     system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\t\t\t\t Welcome in linklist Queue&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; input&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\n 1- Enqueue \n 2- Dequeue \n 3- show list \n 4- Front\n 5- Exit\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; input&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     switch&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;input&lt;span class=&quot;operator&quot;&gt;)
     {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
      linklist_insert&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Number entered \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
      goto&lt;/span&gt; linklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
      linklist_dequeu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
      goto&lt;/span&gt; linklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
      linklist_show&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
      goto&lt;/span&gt; linklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
      linklist_front&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
      goto&lt;/span&gt; linklist_start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
      break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     default&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; You enter invalid number &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
      goto&lt;/span&gt; linklist_start&lt;span class=&quot;operator&quot;&gt;;
     }
    }&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    void&lt;/span&gt; linklist_insert&lt;span class=&quot;operator&quot;&gt;()
    {&lt;/span&gt;
     c&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; new&lt;/span&gt; list&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;linklist_counter&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
     {&lt;/span&gt;
      f&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      p&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Enter data &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
     {&lt;/span&gt;
      p&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      p&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Enter data&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;
     c&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     linklist_counter&lt;span class=&quot;operator&quot;&gt;++;
    }&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    void&lt;/span&gt; linklist_dequeu&lt;span class=&quot;operator&quot;&gt;()
    {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;linklist_counter&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
     {&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Queue is empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
     }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
     {&lt;/span&gt;
      f&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; f&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      linklist_counter&lt;span class=&quot;operator&quot;&gt;--;&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Number deleted \n &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
     }
    }&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    void&lt;/span&gt; linklist_show&lt;span class=&quot;operator&quot;&gt;()
    {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; emp&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; linklist_isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;emp&lt;span class=&quot;operator&quot;&gt;)
     {&lt;/span&gt;
      temp&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; f&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
      while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;temp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt; NULL&lt;span class=&quot;operator&quot;&gt;)
      {&lt;/span&gt;
       cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; temp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
       temp&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; temp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;
      }&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; temp&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
     {&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Queue is empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;
     system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
    }&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    void&lt;/span&gt; linklist_front&lt;span class=&quot;operator&quot;&gt;()
    {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; emp&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; linklist_isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;emp&lt;span class=&quot;operator&quot;&gt;)
     {&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; f&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;data&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
     {&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Queue is empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;
     system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
    }&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; linklist_isempty&lt;span class=&quot;operator&quot;&gt;()
    {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;linklist_counter&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
    }&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
Read Also: &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/2017/03/queue-implementation-in-c-using-array.html&quot; target=&quot;_blank&quot;&gt;Array based queue c++ code example&lt;/a&gt;&lt;br /&gt;
program output:&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/BzVa44UErH4/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/BzVa44UErH4?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7SYw3YEqIxuTZofSTO3JyttpRqcHw53ejHLbfs6Gk8EWTL69uLbuqUE-lUVY3TeU_liJSKbwrMQ93t1_9PS9X6xsjx7-qkLjcBsbdJUUEu4pXmHUp1dGMLlaa3t3Q8I3LYLeDJ5t0ynV4/s1600/cplusplus_link_list_queue_implemetation.PNG&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;c++ program for implementing queue using linked list.&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7SYw3YEqIxuTZofSTO3JyttpRqcHw53ejHLbfs6Gk8EWTL69uLbuqUE-lUVY3TeU_liJSKbwrMQ93t1_9PS9X6xsjx7-qkLjcBsbdJUUEu4pXmHUp1dGMLlaa3t3Q8I3LYLeDJ5t0ynV4/s1600/cplusplus_link_list_queue_implemetation.PNG&quot; title=&quot;c++ code for queue using linked list example&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;b&gt;linked list queue c++&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;
As a beginner, this code helps the student to clear the concept of the queue using a linked list. It can be used as started code for beginners. find a full&amp;nbsp;&lt;a href=&quot;http://fahad-cprogramming.blogspot.com/2016/10/array-based-queue-cpp-simple-project.html&quot; target=&quot;_blank&quot;&gt; c++ array based queue project&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;also read other projects here: &lt;a href=&quot;https://fahad-cprogramming.blogspot.com/p/cpp-projects.html&quot; target=&quot;_blank&quot;&gt;c++ simple projects&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/1813786380639419168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/03/c-code-queue-implementation-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/1813786380639419168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/1813786380639419168'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/03/c-code-queue-implementation-using.html' title='queue data structure implementation c++ code using linked list'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/BzVa44UErH4/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-8108849361519091184</id><published>2017-03-08T14:48:00.002-08:00</published><updated>2021-03-01T06:40:41.304-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="array based queue c++"/><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="queue"/><title type='text'>queue implementation in c++ programming using array</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Simple c++ queue using array implementation example&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;which uses function loops and conditional statement concepts.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Queue size is fixed in a variable name &#39;total which is equal to 5 it can be changed as a requirement.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;User select function from menu and enter input.&lt;br /&gt;
We have the following functions in queue&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Enqueue&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Dequeue&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Is Empty (check if the queue is empty)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Is Full &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Show All&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
Prototypes are&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre&gt;void enqueue(int);&lt;/pre&gt;
&lt;pre&gt;void dequeue();&lt;/pre&gt;
&lt;pre&gt;int isempty();&lt;/pre&gt;
&lt;pre&gt;int isfull();&lt;/pre&gt;
&lt;pre&gt;void show();&lt;/pre&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;C++ Queue Source Code&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;#include&amp;lt;iostream&amp;gt;
#include&amp;lt;windows.h&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
// Queue for array
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; enqueue&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dequeue&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; isfull&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; array_call&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; show&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
const&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; total&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; marks&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;total&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; rear&lt;span class=&quot;operator&quot;&gt; = -&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //rear mean last element of queue
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; front&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;//front mean first element of queue
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; counter&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
    array_call&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

// function of Array
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; array_call&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
start&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\t\t\t\t Welcome in Queue with Array&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; input&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\n 1- Enqueu \n 2- Dequeu \n 3- Front\n 4- Show all data \n 5- Exit from Queue in Array \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; input&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 switch&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;input&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
 {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; z&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; z&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; isfull&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;z&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
  int&lt;/span&gt; y&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;//y is input whiich you insert in queue
&lt;/span&gt;  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter you number: &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; y&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  enqueue&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; Number entered \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Your Queue is full \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 goto&lt;/span&gt; start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;

 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
 {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  dequeue&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Number deleted \n &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Your Queue is Empty \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 goto&lt;/span&gt; start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;

 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
 {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
  int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\n Your front value is &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; marks&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;]&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Your Queue is Empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;

 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
 {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
  int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
   show&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Your Queue is Empty&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; start&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;

 case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 default&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\n You enter invalid Number \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  goto&lt;/span&gt; start&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }

}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; enqueue&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; x&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 rear&lt;span class=&quot;operator&quot;&gt; = (&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) %&lt;/span&gt; total&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 marks&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;] =&lt;/span&gt; x&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 counter&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; counter&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; dequeue&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
 front&lt;span class=&quot;operator&quot;&gt; = (&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) %&lt;/span&gt; total&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 counter&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; counter&lt;span class=&quot;operator&quot;&gt; -&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; isempty&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;counter&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; isfull&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;counter&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt; total&lt;span class=&quot;operator&quot;&gt;);
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; show&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; j&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; front&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt; &amp;lt;&lt;/span&gt; counter&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;++)
 {&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot; &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; marks&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;j&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;
  j&lt;span class=&quot;operator&quot;&gt;++;&lt;/span&gt;
  j&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; j&lt;span class=&quot;operator&quot;&gt;%&lt;/span&gt;total&lt;span class=&quot;operator&quot;&gt;;
 }
}&lt;/span&gt;
&lt;/pre&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Run the program&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/P2RuMecc330/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/P2RuMecc330?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
Example input output&lt;br /&gt;
&lt;/span&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9sqkl-rd15X8wmkTVsTrhHcXXzB30RZ4QivBeu80dMn22bm8ZVRQ50xWMn8OybiMoA5pSoTVKYpm18Eqm8dj5exEWi6HJ1Pbp3pDgPzpOPymRsPKYywauMtVqvVY0MXSTCrIeojb8vzm3/s1600/queue_implementation_cplusplus_using_array.PNG&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;img alt=&quot;queue implementation in c++ using array&quot; border=&quot;0&quot; height=&quot;126&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9sqkl-rd15X8wmkTVsTrhHcXXzB30RZ4QivBeu80dMn22bm8ZVRQ50xWMn8OybiMoA5pSoTVKYpm18Eqm8dj5exEWi6HJ1Pbp3pDgPzpOPymRsPKYywauMtVqvVY0MXSTCrIeojb8vzm3/s320/queue_implementation_cplusplus_using_array.PNG&quot; title=&quot;queue implementation in c++ using array&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Input-output&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;
See also: &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/2016/10/array-based-queue-cpp-simple-project.html&quot; target=&quot;_blank&quot;&gt;C++ Project Using Array Based Queue&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;
This example may help beginner students to understand the concept of an array using a queue. It is recommended to change the code add validations etc.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/8108849361519091184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/03/queue-implementation-in-c-using-array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/8108849361519091184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/8108849361519091184'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/03/queue-implementation-in-c-using-array.html' title='queue implementation in c++ programming using array'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/P2RuMecc330/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-8757799005025506294</id><published>2017-02-24T13:43:00.001-08:00</published><updated>2021-03-01T06:55:39.566-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="pay"/><category scheme="http://www.blogger.com/atom/ns#" term="project"/><category scheme="http://www.blogger.com/atom/ns#" term="roll"/><category scheme="http://www.blogger.com/atom/ns#" term="source"/><title type='text'>Payroll management system project C++ source code</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Payroll management system project in C++ is a console application with the use of Object Oriented Programming with graphics&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;This project has multiple classes and sub-classes. User can perform basic actions like&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;create, edit, and delete an employee&#39;s record&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
Besides these, this c++ payroll management project also allows users to &lt;b&gt;print the salary slip for a particular employee&lt;/b&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Employee’s grades are categorized as A, B, C, D and E.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;This project is large, complete and we tried our best to make it error-free. The source code is very long – over 1500 lines and developed in Code Blocks compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;div&gt;
&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
It uses the concept&amp;nbsp;of following c/c++ topics:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Pointers&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Loops&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Functions&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;If Else&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Switch&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Classes&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;File handling&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;C++ Graphics&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Function overriding and overloading&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;composition&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
The Project has 3 main classes and with many functions in the menu&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;LINES&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;LINE_HOR&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;LINE_VER&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;BOX&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;CLEARUP&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;CLEARDOWN&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;MENUS&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;MAIN_MENU&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;EDIT_MENU&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;INTRODUCTION&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;EMPLOYEE&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;NEW_EMPLOYEE&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;MODIFICATION&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;DELETION&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;DISPLAY&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;LIST&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;SALARY_SLIP&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;ADD_RECORD &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;MODIFY_RECORD&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;DELETE_RECORD&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;LASTCODE&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;CODEFOUND&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;RECORDNO&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;FOUND_CODE&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;DISPLAY_RECORD&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;VALID_DATE&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;
How Project Works:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Addition of a New Employee&lt;/b&gt;: &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;This feature is under the public functions of class employees.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;The information handled in this feature is employee code number, name, address, phone number, joining date (day, month and year), designation, grade and loan.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Modify or Editing an Employee Record&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Users can edit the employee&#39;s code number, joining date (day, month and year), name, address, phone number, designation, grade, house allowance and loan given to the employee.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Deleting an Employee Record:&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;An employee&#39;s record can be deleted using the employee&#39;s code. A deletion confirmation message displays whether the user really wants to delete the record from the file.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;b&gt;Printing an Employee Salary Slip&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;This feature also asks for the employee code.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Please note: Being unique, the employee code has been used to unlock or perform operations in many features of this payroll management system project in C++.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;This function lists all the months of the year and asks for a date, employee name, designation, and grade from the user.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;To print the salary slip, the user further needs to provide information such as a number of days worked in the month by the employee and the number of hours worked overtime.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;The slip enlists the basic salary, allowance, deductions and net salary of the employee.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Displaying Employee Record:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;By entering the employee&#39;s code number, users can access all the provided information related to a particular employee via this function.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;The employee record information displayed is the one provided while adding a new employee record.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Displaying List of Employees:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;This feature displays the record of all employees added to a file.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;The records are displayed in a tabular pattern inclding information such as the code name of the employee, phone number, date of joining, designation, grade and salary.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;
#include&amp;lt;Windows.h&amp;gt;
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;fstream&amp;gt;
#include &amp;lt;process.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;ctype.h&amp;gt;
#include &amp;lt;conio.h&amp;gt;
#include &amp;lt;time.h&amp;gt;
#include &amp;lt;unistd.h&amp;gt;

#include &amp;lt;dos.h&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

void&lt;/span&gt; gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; x&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; y&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 COORD c&lt;span class=&quot;operator&quot;&gt; = {&lt;/span&gt; x&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; y&lt;span class=&quot;operator&quot;&gt; };&lt;/span&gt;
 SetConsoleCursorPosition&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;GetStdHandle&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;STD_OUTPUT_HANDLE&lt;span class=&quot;operator&quot;&gt;),&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;);
}&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;


class&lt;/span&gt; LINES&lt;span class=&quot;operator&quot;&gt;
{&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
public&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; LINE_HOR&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; LINE_VER&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; BOX&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; CLEARUP&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; CLEARDOWN&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
};&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;



class&lt;/span&gt; MENU&lt;span class=&quot;operator&quot;&gt;
{&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
public&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; MAIN_MENU&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
private&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; EDIT_MENU&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; INTRODUCTION&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
};&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;



class&lt;/span&gt; EMPLOYEE&lt;span class=&quot;operator&quot;&gt;
{&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
public&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; NEW_EMPLOYEE&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; MODIFICATION&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; DELETION&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; DISPLAY&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; LIST&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; SALARY_SLIP&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
private&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; ADD_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;[],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;[],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;[],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;[],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; float&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; float&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; MODIFY_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;[],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;[],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;[],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;[],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; float&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; float&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; DELETE_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt;  LASTCODE&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt;  CODEFOUND&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt;  RECORDNO&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt;  FOUND_CODE&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; DISPLAY_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt;  VALID_DATE&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

 int&lt;/span&gt;   code&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; dd&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; mm&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; yy&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt;  name&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;26&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt; address&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt; phone&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt; desig&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt;  grade&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; house&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; convense&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 float&lt;/span&gt; loan&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; basic&lt;span class=&quot;operator&quot;&gt;;
};&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;



void&lt;/span&gt; MENU&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;MAIN_MENU&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 LINES L&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;CLEARUP&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;14&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;     C++ Project for Payroll Management System&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;BOX&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 7&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 57&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 218&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;BOX&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 71&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 21&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 218&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;BOX&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 70&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 219&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;PAYROLL MANAGEMENT SYSTEM&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 11&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;1: NEW EMPLOYEE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 12&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;2: DISPLAY EMPLOYEE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;3: LIST OF EMPLOYEES&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 14&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;4: SALARY SLIP&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;5: EDIT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 16&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;0: QUIT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 18&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ENTER YOUR CHOICE :&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 23&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;

  ch&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; _getch&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 27&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;1&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   EMPLOYEE E&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   E&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;NEW_EMPLOYEE&lt;span class=&quot;operator&quot;&gt;();
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;2&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   EMPLOYEE E&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   E&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;DISPLAY&lt;span class=&quot;operator&quot;&gt;();
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;3&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   EMPLOYEE E&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   E&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;LIST&lt;span class=&quot;operator&quot;&gt;();
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;4&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   EMPLOYEE E&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   E&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;SALARY_SLIP&lt;span class=&quot;operator&quot;&gt;();
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;5&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
   EDIT_MENU&lt;span class=&quot;operator&quot;&gt;();
 }&lt;/span&gt;
 L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;CLEARUP&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;



void&lt;/span&gt; MENU&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;EDIT_MENU&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 LINES L&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;CLEARDOWN&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;BOX&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 49&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 218&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;BOX&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 71&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 21&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 218&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;BOX&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;11&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 70&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 219&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;E D I T  M E N U&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;1: DELETE RECORD&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 14&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;2: MODIFY RECORD&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;0: EXIT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 17&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ENTER YOUR CHOICE :&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  ch&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; _getch&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 27&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;1&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   EMPLOYEE E&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   E&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;DELETION&lt;span class=&quot;operator&quot;&gt;();
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;2&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   EMPLOYEE E&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   E&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;MODIFICATION&lt;span class=&quot;operator&quot;&gt;();
  }
 }&lt;/span&gt;
 L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;CLEARDOWN&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;


void&lt;/span&gt; LINES&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;LINE_HOR&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; column1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; column2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; row&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;column1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; column1&lt;span class=&quot;operator&quot;&gt; &amp;lt;=&lt;/span&gt; column2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; column1&lt;span class=&quot;operator&quot;&gt;++)
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;column1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;
 }
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;



void&lt;/span&gt; LINES&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;LINE_VER&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; row1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; row2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; column&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;row1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; row1&lt;span class=&quot;operator&quot;&gt; &amp;lt;=&lt;/span&gt; row2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; row1&lt;span class=&quot;operator&quot;&gt;++)
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;column&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;
 }
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;



void&lt;/span&gt; LINES&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;BOX&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; column1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; row1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; column2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; row2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 218&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt; c1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; c2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; c3&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; c4&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt; l1&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 196&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; l2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 179&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  c1&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 218&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  c2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 191&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  c3&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 192&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  c4&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 217&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  l1&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 196&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  l2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 179&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  c1&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  c2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  c3&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  c4&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  l1&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  l2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;column1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; c1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;column2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; c2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;column1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row2&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; c3&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;column2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row2&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; c4&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 column1&lt;span class=&quot;operator&quot;&gt;++;&lt;/span&gt;
 column2&lt;span class=&quot;operator&quot;&gt;--;&lt;/span&gt;
 LINE_HOR&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;column1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; column2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; l1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 LINE_HOR&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;column1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; column2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; l1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 column1&lt;span class=&quot;operator&quot;&gt;--;&lt;/span&gt;
 column2&lt;span class=&quot;operator&quot;&gt;++;&lt;/span&gt;
 row1&lt;span class=&quot;operator&quot;&gt;++;&lt;/span&gt;
 row2&lt;span class=&quot;operator&quot;&gt;--;&lt;/span&gt;
 LINE_VER&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;row1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; column1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; l2&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 LINE_VER&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;row1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; column2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; l2&lt;span class=&quot;operator&quot;&gt;);
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// THIS FUNCTION CLEAR THE SCREEN LINE BY LINE UPWARD
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; LINES&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;CLEARUP&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt; &amp;gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;--)
 {&lt;/span&gt;
  sleep&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();
 }
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;



void&lt;/span&gt; LINES&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;CLEARDOWN&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt; &amp;lt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;++)
 {&lt;/span&gt;
  delay&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();
 }
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// THIS FUNCTION ADDS THE GIVEN DATA IN THE EMPLOYEE&#39;S FILE
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; EMPLOYEE&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;ADD_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; ename&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;26&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; eaddress&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; ephone&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; d&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; m&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; y&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; edesig&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; egrade&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; ehouse&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; econv&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; float&lt;/span&gt; eloan&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; float&lt;/span&gt; ebasic&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 fstream file&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;open&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;EMPLOYEE.DAT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 code&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 strcpy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;name&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ename&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 strcpy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;address&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; eaddress&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 strcpy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;phone&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ephone&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 dd&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; d&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 mm&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; m&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 yy&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; y&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 strcpy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;desig&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; edesig&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 grade&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; egrade&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 house&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; ehouse&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 convense&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; econv&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 loan&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; eloan&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 basic&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; ebasic&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;write&lt;span class=&quot;operator&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *)&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; this&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; sizeof&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;EMPLOYEE&lt;span class=&quot;operator&quot;&gt;));&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;close&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// THIS FUNCTION MODIFY THE GIVEN DATA IN THE
// EMPLOYEE&#39;S FILE
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; EMPLOYEE&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;MODIFY_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; ename&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;26&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; eaddress&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; ephone&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; edesig&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; egrade&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; ehouse&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; char&lt;/span&gt; econv&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; float&lt;/span&gt; eloan&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; float&lt;/span&gt; ebasic&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; recno&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 recno&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; RECORDNO&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 fstream file&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;open&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;EMPLOYEE.DAT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;out&lt;span class=&quot;operator&quot;&gt; |&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;ate&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 strcpy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;name&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ename&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 strcpy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;address&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; eaddress&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 strcpy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;phone&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ephone&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 strcpy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;desig&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; edesig&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 grade&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; egrade&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 house&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; ehouse&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 convense&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; econv&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 loan&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; eloan&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 basic&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; ebasic&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; location&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 location&lt;span class=&quot;operator&quot;&gt; = (&lt;/span&gt;recno&lt;span class=&quot;operator&quot;&gt; -&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) *&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; sizeof&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;EMPLOYEE&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;seekp&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;location&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;write&lt;span class=&quot;operator&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *)&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; this&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; sizeof&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;EMPLOYEE&lt;span class=&quot;operator&quot;&gt;));&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;close&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// THIS FUNCTION DELETE THE RECORD IN THE EMPLOYEE FILE
// FOR THE GIVEN EMPLOYEE CODE
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; EMPLOYEE&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;DELETE_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 fstream file&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;open&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;EMPLOYEE.DAT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;in&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 fstream temp&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 temp&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;open&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;temp.dat&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;out&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;seekg&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;beg&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;eof&lt;span class=&quot;operator&quot;&gt;())
 {&lt;/span&gt;
  file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;read&lt;span class=&quot;operator&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *)&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; this&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; sizeof&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;EMPLOYEE&lt;span class=&quot;operator&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;eof&lt;span class=&quot;operator&quot;&gt;())&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;code&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
   temp&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;write&lt;span class=&quot;operator&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *)&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; this&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; sizeof&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;EMPLOYEE&lt;span class=&quot;operator&quot;&gt;));
 }&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;close&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
 temp&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;close&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;open&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;EMPLOYEE.DAT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;out&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 temp&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;open&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;temp.dat&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;in&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 temp&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;seekg&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;beg&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;temp&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;eof&lt;span class=&quot;operator&quot;&gt;())
 {&lt;/span&gt;
  temp&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;read&lt;span class=&quot;operator&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *)&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; this&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; sizeof&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;EMPLOYEE&lt;span class=&quot;operator&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;temp&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;eof&lt;span class=&quot;operator&quot;&gt;())&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;write&lt;span class=&quot;operator&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *)&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; this&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; sizeof&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;EMPLOYEE&lt;span class=&quot;operator&quot;&gt;));
 }&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;close&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
 temp&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;close&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// THIS FUNCTION RETURNS THE LAST EMPLOYEE&#39;S CODE
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; EMPLOYEE&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;LASTCODE&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 fstream file&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;open&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;EMPLOYEE.DAT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;in&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;seekg&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;beg&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; count&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;read&lt;span class=&quot;operator&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *)&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; this&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; sizeof&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;EMPLOYEE&lt;span class=&quot;operator&quot;&gt;)))&lt;/span&gt;
  count&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; code&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;close&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt; count&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// THIS FUNCTION RETURNS 0 IF THE GIVEN CODE NOT FOUND
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; EMPLOYEE&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;FOUND_CODE&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 fstream file&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;open&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;EMPLOYEE.DAT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;in&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;seekg&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;beg&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; found&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;read&lt;span class=&quot;operator&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *)&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; this&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; sizeof&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;EMPLOYEE&lt;span class=&quot;operator&quot;&gt;)))
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;code&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   found&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
  }
 }&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;close&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt; found&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// THIS FUNCTION RETURNS RECORD NO. OF THE GIVEN CODE
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; EMPLOYEE&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;RECORDNO&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 fstream file&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;open&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;EMPLOYEE.DAT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;in&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;seekg&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;beg&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; recno&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;read&lt;span class=&quot;operator&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *)&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; this&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; sizeof&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;EMPLOYEE&lt;span class=&quot;operator&quot;&gt;)))
 {&lt;/span&gt;
  recno&lt;span class=&quot;operator&quot;&gt;++;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;code&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;close&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt; recno&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// THIS FUNCTION DISPLAYS THE LIST OF THE EMPLOYEES
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; EMPLOYEE&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;LIST&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; row&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; found&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; flag&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;LIST OF EMPLOYEES&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;~~~~~~~~~~~~~~~~~~~&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;CODE NAME                     PHONE    DOJ         DESIGNATION    GRADE  SALARY&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 fstream file&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;open&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;EMPLOYEE.DAT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;in&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;seekg&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;beg&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;read&lt;span class=&quot;operator&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *)&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; this&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; sizeof&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;EMPLOYEE&lt;span class=&quot;operator&quot;&gt;)))
 {&lt;/span&gt;
  flag&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  delay&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  found&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; code&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; name&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; phone&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;40&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; dd&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;/&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; mm&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;/&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; yy&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;52&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; desig&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;69&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; grade&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;grade&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;E&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;74&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; basic&lt;span class=&quot;operator&quot;&gt;;
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
  {&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;76&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; row&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;-&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;row&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 23&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   flag&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   row&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Press any key to continue or Press &amp;lt;ESC&amp;gt; to exit&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   ch&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; getch&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 27&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;LIST OF EMPLOYEES&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;~~~~~~~~~~~~~~~~~~~&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;CODE NAME                     PHONE    DOJ         DESIGNATION    GRADE  SALARY&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else&lt;/span&gt;
   row&lt;span class=&quot;operator&quot;&gt;++;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;found&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Records not found&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;flag&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Press any key to continue...&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  getche&lt;span class=&quot;operator&quot;&gt;();
 }&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;close&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// THIS FUNCTION DISPLAYS THE RECORD OF THE EMPLOYEES
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; EMPLOYEE&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;DISPLAY_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 fstream file&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;open&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;EMPLOYEE.DAT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;in&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;seekg&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;beg&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;read&lt;span class=&quot;operator&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *)&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; this&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; sizeof&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;EMPLOYEE&lt;span class=&quot;operator&quot;&gt;)))
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;code&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Employee Code # &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; code&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;~~~~~~~~~~~~~&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 7&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Name         : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; name&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Address      : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; address&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Phone no.    : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; phone&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 11&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;JOINING DATE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 12&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;~~~~~~~~~~~~&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Day   : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; dd&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 14&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Month : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; mm&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Year  : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; yy&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 17&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Designation  : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; desig&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 18&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Grade        : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; grade&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;grade&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;E&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
   {&lt;/span&gt;
    gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 19&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;House (y/n)    : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; house&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Convense (y/n) : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; convense&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Basic Salary   : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; basic&lt;span class=&quot;operator&quot;&gt;;
   }&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 21&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Loan           : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; loan&lt;span class=&quot;operator&quot;&gt;;
  }
 }&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;close&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// THIS FUNCTION GIVE DATA TO ADD IN THE FILE
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; EMPLOYEE&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;NEW_EMPLOYEE&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt;  ch&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; egrade&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ehouse&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; econv&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt;  ename&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;26&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt; eaddress&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt; ephone&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt; edesig&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt; t1&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 float&lt;/span&gt; t2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;float&quot;&gt; 0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; eloan&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;float&quot;&gt; 0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ebasic&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;float&quot;&gt; 0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt;   d&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; m&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; y&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; valid&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;72&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;&amp;lt;0&amp;gt;=EXIT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ADDITION OF NEW EMPLOYEE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Employee Code # &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;~~~~~~~~~~~~~&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 7&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Name         : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Address      : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Phone no.    : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 11&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;JOINING DATE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 12&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;~~~~~~~~~~~~&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Day   : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 14&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Month : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Year  : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 17&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Designation  : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 18&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Grade        : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 21&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Loan           : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;

 ecode&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; LASTCODE&lt;span class=&quot;operator&quot;&gt;() +&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  ADD_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;null&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;null&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;null&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;null&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;n&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;n&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;n&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;float&quot;&gt; 0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;float&quot;&gt; 0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  DELETE_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;21&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter the name of the Employee&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 7&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ename&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  strupr&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ename&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ename&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;] ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ename&lt;span class=&quot;operator&quot;&gt;) &amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ename&lt;span class=&quot;operator&quot;&gt;) &amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Enter correctly (Range: 1..25)&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   getch&lt;span class=&quot;operator&quot;&gt;();
  }
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter Address of the Employee&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;eaddress&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  strupr&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;eaddress&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;eaddress&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;] ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;eaddress&lt;span class=&quot;operator&quot;&gt;) &amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;eaddress&lt;span class=&quot;operator&quot;&gt;) &amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Enter correctly (Range: 1..30)&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   getch&lt;span class=&quot;operator&quot;&gt;();
  }
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter Phone no. of the Employee or Press &amp;lt;ENTER&amp;gt; for none&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ephone&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ephone&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;] ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ((&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ephone&lt;span class=&quot;operator&quot;&gt;) &amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 7&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ephone&lt;span class=&quot;operator&quot;&gt;) &amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) || (&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ephone&lt;span class=&quot;operator&quot;&gt;) &amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;))
  {&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Enter correctly&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   getch&lt;span class=&quot;operator&quot;&gt;();
  }
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ephone&lt;span class=&quot;operator&quot;&gt;) ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
  strcpy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ephone&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;-&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt; tday&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt; tmonth&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt; tyear&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; td&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
  {&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ENTER DAY OF JOINING&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;tday&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   td&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; atoi&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;tday&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   d&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; td&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;tday&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;] ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;d&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
  {&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ENTER MONTH OF JOINING&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 14&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;tmonth&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   td&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; atoi&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;tmonth&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   m&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; td&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;tmonth&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;] ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;m&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
  {&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ENTER YEAR OF JOINING&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;tyear&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   td&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; atoi&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;tyear&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   y&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; td&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;tyear&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;] ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;d&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; d&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (((&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt; %&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) !=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; m&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; d&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) || ((&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt; %&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; m&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; d&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;))&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ((&lt;/span&gt;m&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; m&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; m&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; m&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 11&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) &amp;amp;&amp;amp;&lt;/span&gt; d&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;y&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1990&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; y&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;2020&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Enter correctly&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   getch&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 14&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();
  }
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter Designation of the Employee&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 17&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;edesig&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  strupr&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;edesig&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;edesig&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;] ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;edesig&lt;span class=&quot;operator&quot;&gt;) &amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;edesig&lt;span class=&quot;operator&quot;&gt;) &amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Enter correctly (Range: 1..15)&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   getch&lt;span class=&quot;operator&quot;&gt;();
  }
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter Grade of the Employee (A,B,C,D,E)&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 18&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  egrade&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; getche&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  egrade&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; toupper&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;egrade&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;egrade&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;egrade&lt;span class=&quot;operator&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;A&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; egrade&lt;span class=&quot;operator&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;E&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;egrade&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;E&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 19&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;House (y/n)    : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Convense (y/n) : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Basic Salary   : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
  {&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ENTER IF HOUSE ALLOWANCE IS ALLOTED TO EMPLOYEE OR NOT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 19&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   ehouse&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; getche&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   ehouse&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; toupper&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ehouse&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ehouse&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ehouse&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;Y&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; ehouse&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
  {&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ENTER IF CONVENCE ALLOWANCE IS ALLOTED TO EMPLOYEE OR NOT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   econv&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; getche&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   econv&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; toupper&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;econv&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;econv&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;econv&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;Y&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; econv&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ENTER LOAN AMOUNT IF ISSUED&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 21&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  t2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; atof&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  eloan&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; t2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;eloan&lt;span class=&quot;operator&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 50000&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7SHOULD NOT GREATER THAN 50000&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   getch&lt;span class=&quot;operator&quot;&gt;();
  }
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;egrade&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;E&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
  {&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ENTER BASIC SALARY OF THE EMPLOYEE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   t2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; atof&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   ebasic&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; t2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;] ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ebasic&lt;span class=&quot;operator&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 50000&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
   {&lt;/span&gt;
    valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
    clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7SHOULD NOT GREATER THAN 50000&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    getch&lt;span class=&quot;operator&quot;&gt;();
   }
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 24&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Do you want to save (y/n) &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  ch&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; getche&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  ch&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; toupper&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;Y&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 ADD_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ename&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; eaddress&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ephone&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; d&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; m&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; y&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; edesig&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; egrade&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ehouse&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; econv&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; eloan&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ebasic&lt;span class=&quot;operator&quot;&gt;);
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// THIS FUNCTION GIVE CODE FOR THE DISPLAY OF THE RECORD
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; EMPLOYEE&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;DISPLAY&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt; t1&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; t2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;72&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;&amp;lt;0&amp;gt;=EXIT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter code of the Employee  &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 t2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; atoi&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 ecode&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; t2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;FOUND_CODE&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt;))
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Record not found&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  getch&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 DISPLAY_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Press any key to continue...&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 getch&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// THIS FUNCTION GIVE DATA FOR THE MODIFICATION OF THE
// EMPLOYEE RECORD
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; EMPLOYEE&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;MODIFICATION&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt;  ch&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; egrade&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ehouse&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; econv&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt;  ename&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;26&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt; eaddress&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt; ephone&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt; edesig&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt; t1&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 float&lt;/span&gt; t2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;float&quot;&gt; 0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; eloan&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;float&quot;&gt; 0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ebasic&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;float&quot;&gt; 0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt;   ecode&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; valid&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;72&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;&amp;lt;0&amp;gt;=EXIT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter code of the Employee  &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 t2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; atoi&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 ecode&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; t2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;FOUND_CODE&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt;))
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Record not found&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  getch&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;72&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;&amp;lt;0&amp;gt;=EXIT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;MODIFICATION OF THE EMPLOYEE RECORD&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 DISPLAY_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 24&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Do you want to modify this record (y/n) &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  ch&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; getche&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  ch&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; toupper&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;Y&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 fstream file&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;open&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;EMPLOYEE.DAT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;in&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;seekg&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;beg&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;read&lt;span class=&quot;operator&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *)&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; this&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; sizeof&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;EMPLOYEE&lt;span class=&quot;operator&quot;&gt;)))
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;code&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;close&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Employee Code # &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;~~~~~~~~~~~~~&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;40&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;JOINING DATE : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;40&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;~~~~~~~~~~~~~~&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;55&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; dd&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;/&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; mm&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;/&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; yy&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 7&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Name         : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Address      : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Phone no.    : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Designation  : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 11&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Grade        : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 14&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Loan           : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter the name of the Employee or &amp;lt;ENTER&amp;gt; FOR NO CHANGE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 7&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ename&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  strupr&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ename&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ename&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;] ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ename&lt;span class=&quot;operator&quot;&gt;) &amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Enter correctly (Range: 1..25)&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   getch&lt;span class=&quot;operator&quot;&gt;();
  }
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ename&lt;span class=&quot;operator&quot;&gt;) ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  strcpy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ename&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; name&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 7&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; ename&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter Address of the Employee or &amp;lt;ENTER&amp;gt; FOR NO CHANGE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;eaddress&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  strupr&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;eaddress&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;eaddress&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;] ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;eaddress&lt;span class=&quot;operator&quot;&gt;) &amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Enter correctly (Range: 1..30)&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   getch&lt;span class=&quot;operator&quot;&gt;();
  }
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;eaddress&lt;span class=&quot;operator&quot;&gt;) ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  strcpy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;eaddress&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; address&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; eaddress&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter Phone no. of the Employee or or &amp;lt;ENTER&amp;gt; FOR NO CHANGE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ephone&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ephone&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;] ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ((&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ephone&lt;span class=&quot;operator&quot;&gt;) &amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 7&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ephone&lt;span class=&quot;operator&quot;&gt;) &amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) || (&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ephone&lt;span class=&quot;operator&quot;&gt;) &amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;))
  {&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Enter correctly&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   getch&lt;span class=&quot;operator&quot;&gt;();
  }
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ephone&lt;span class=&quot;operator&quot;&gt;) ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  strcpy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ephone&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; phone&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; ephone&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter Designation of the Employee or &amp;lt;ENTER&amp;gt; FOR NO CHANGE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;edesig&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  strupr&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;edesig&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;edesig&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;] ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;edesig&lt;span class=&quot;operator&quot;&gt;) &amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Enter correctly (Range: 1..15)&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   getch&lt;span class=&quot;operator&quot;&gt;();
  }
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;edesig&lt;span class=&quot;operator&quot;&gt;) ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  strcpy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;edesig&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; desig&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; edesig&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter Grade of the Employee (A,B,C,D,E) or &amp;lt;ENTER&amp;gt; FOR NO CHANGE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 11&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  egrade&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; getche&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  egrade&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; toupper&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;egrade&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;egrade&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;egrade&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   egrade&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; grade&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 11&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; grade&lt;span class=&quot;operator&quot;&gt;;
  }
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;egrade&lt;span class=&quot;operator&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;A&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; egrade&lt;span class=&quot;operator&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;E&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;egrade&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;E&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 12&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;House (y/n)    : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Convense (y/n) : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Basic Salary   : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
  {&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ALLOTED HOUSE ALLOWANCE ? or &amp;lt;ENTER&amp;gt; FOR NO CHANGE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 12&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   ehouse&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; getche&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   ehouse&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; toupper&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ehouse&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ehouse&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ehouse&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
   {&lt;/span&gt;
    ehouse&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; house&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 12&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; ehouse&lt;span class=&quot;operator&quot;&gt;;
   }
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ehouse&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;Y&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; ehouse&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
  {&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ALLOTED CONVENCE ALLOWANCE or &amp;lt;ENTER&amp;gt; FOR NO CHANGE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   econv&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; getche&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   econv&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; toupper&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;econv&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;econv&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;econv&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
   {&lt;/span&gt;
    econv&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; convense&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; econv&lt;span class=&quot;operator&quot;&gt;;
   }
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;econv&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;Y&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; econv&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ENTER LOAN AMOUNT or &amp;lt;ENTER&amp;gt; FOR NO CHANGE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 14&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  t2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; atof&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  eloan&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; t2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;eloan&lt;span class=&quot;operator&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 50000&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7SHOULD NOT GREATER THAN 50000&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   getch&lt;span class=&quot;operator&quot;&gt;();
  }
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;) ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  eloan&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; loan&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 14&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; eloan&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;egrade&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;E&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
  {&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ENTER BASIC SALARY or &amp;lt;ENTER&amp;gt; FOR NO CHANGE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
   gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   t2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; atof&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   ebasic&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; t2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;] ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ebasic&lt;span class=&quot;operator&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 50000&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
   {&lt;/span&gt;
    valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
    clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7SHOULD NOT GREATER THAN 50000&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    getch&lt;span class=&quot;operator&quot;&gt;();
   }
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;strlen&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;) ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   ebasic&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; basic&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; ebasic&lt;span class=&quot;operator&quot;&gt;;
  }
 }&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 18&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Do you want to save (y/n) &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  ch&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; getche&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  ch&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; toupper&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;Y&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 MODIFY_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ename&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; eaddress&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ephone&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; edesig&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; egrade&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ehouse&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; econv&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; eloan&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ebasic&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 23&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Record Modified&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Press any key to continue...&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 getch&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// THIS FUNCTION GIVE CODE NO. FOR THE DELETION OF THE
// EMPLOYEE RECORD
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; EMPLOYEE&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;DELETION&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt; t1&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;],&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; t2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;72&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;&amp;lt;0&amp;gt;=EXIT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter code of the Employee  &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 t2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; atoi&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 ecode&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; t2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;FOUND_CODE&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt;))
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Record not found&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  getch&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;72&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;&amp;lt;0&amp;gt;=EXIT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;24&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;DELETION OF THE EMPLOYEE RECORD&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 DISPLAY_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 24&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  clreol&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Do you want to delete this record (y/n) &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  ch&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; getche&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
  ch&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; toupper&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;Y&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;N&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 DELETE_RECORD&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 LINES L&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;CLEARDOWN&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 23&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Record Deleted&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Press any key to continue...&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 getch&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// THIS FUNCTION RETURN 0 IF THE GIVEN DATE IS INVALID
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; EMPLOYEE&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;VALID_DATE&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; d1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; m1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt; y1&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;d1&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; d1&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
  valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (((&lt;/span&gt;y1&lt;span class=&quot;operator&quot;&gt; %&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) !=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; m1&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; d1&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;28&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) || ((&lt;/span&gt;y1&lt;span class=&quot;operator&quot;&gt; %&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; m1&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;amp;&amp;amp;&lt;/span&gt; d1&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;29&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;))&lt;/span&gt;
  valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ((&lt;/span&gt;m1&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; m1&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; m1&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; m1&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 11&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) &amp;amp;&amp;amp;&lt;/span&gt; d1&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
  valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 return&lt;/span&gt; valid&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// THIS FUNCTION PRINTS THE SALARY SLIP FOR THE EMPLOYEE
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; EMPLOYEE&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;SALARY_SLIP&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt; t1&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; t2&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; valid&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;72&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;&amp;lt;0&amp;gt;=EXIT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter code of the Employee  &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 t2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; atoi&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 ecode&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; t2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;FOUND_CODE&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ecode&lt;span class=&quot;operator&quot;&gt;))
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7Record not found&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  getch&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  return&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 fstream file&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;open&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;EMPLOYEE.DAT&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;in&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;seekg&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; ios&lt;span class=&quot;operator&quot;&gt;::&lt;/span&gt;beg&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;read&lt;span class=&quot;operator&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *)&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; this&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; sizeof&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;EMPLOYEE&lt;span class=&quot;operator&quot;&gt;)))
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;code&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt; ecode&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 file&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;close&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; d1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; m1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; y1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
 struct&lt;/span&gt; date d&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 getdate&lt;span class=&quot;operator&quot;&gt;(&amp;amp;&lt;/span&gt;d&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 d1&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; d&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;da_day&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 m1&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; d&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;da_mon&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 y1&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; d&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;da_year&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;mon&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;] = {&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;January&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;February&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;March&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;April&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;May&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;June&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;July&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;August&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;September&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;November&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;December&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; };&lt;/span&gt;
 LINES L&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;BOX&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 79&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 25&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 219&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;NADEEM AKHTAR, PGDBA - 200754667&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;LINE_HOR&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 78&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 196&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;34&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;SALARY SLIP&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;60&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Date: &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; d1&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;/&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; m1&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;/&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; y1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;34&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; mon&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;m1&lt;span class=&quot;operator&quot;&gt; -&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;] &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;, &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; y1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;LINE_HOR&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 78&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 196&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 7&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Employee Name : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; name&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Designation   : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; desig&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;67&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Grade : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; grade&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;BOX&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 75&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 218&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 L&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;LINE_HOR&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 71&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 196&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; days&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; hours&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;grade&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;E&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
  {&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 21&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ENTER NO. OF DAYS WORKED IN THE MONTH &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 11&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;No. of Days   : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   t2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; atof&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   days&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; t2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;VALID_DATE&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;days&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; m1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; y1&lt;span class=&quot;operator&quot;&gt;))
   {&lt;/span&gt;
    valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 21&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7ENTER CORRECTLY                       &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    getch&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
    gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 11&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;                    &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
   }
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
  {&lt;/span&gt;
   valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 21&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ENTER NO. OF HOURS WORKED OVER TIME   &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;No. of hours  : &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   t2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; atof&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;t1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   hours&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; t2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;hours&lt;span class=&quot;operator&quot;&gt; &amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ||&lt;/span&gt; hours&lt;span class=&quot;operator&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
   {&lt;/span&gt;
    valid&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 21&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;\7ENTER CORRECTLY                     &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    getch&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
    gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;                    &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
   }
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (!&lt;/span&gt;valid&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 21&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;                                               &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 11&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;                        &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;                        &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Basic Salary         : Rs.&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 12&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;ALLOWANCE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;grade&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;E&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;HRA  : Rs.&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 14&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;CA   : Rs.&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;DA   : Rs.&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;OT   : Rs.&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 17&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;DEDUCTIONS&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 18&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;LD   : Rs.&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;grade&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;E&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 19&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;PF   : Rs.&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 21&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;NET SALARY           : Rs.&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 24&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;CASHIER&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;68&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 24&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;EMPLOYEE&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 float&lt;/span&gt; HRA&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;float&quot;&gt; 0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; CA&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;float&quot;&gt; 0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; DA&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;float&quot;&gt; 0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; PF&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;float&quot;&gt; 0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; LD&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;float&quot;&gt; 0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; OT&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;float&quot;&gt; 0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; allowance&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; deduction&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; netsalary&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;grade&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;E&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;house&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;Y&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
   HRA&lt;span class=&quot;operator&quot;&gt; = (&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt; basic&lt;span class=&quot;operator&quot;&gt;) /&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 100&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;convense&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;Y&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
   CA&lt;span class=&quot;operator&quot;&gt; = (&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt; basic&lt;span class=&quot;operator&quot;&gt;) /&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 100&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  DA&lt;span class=&quot;operator&quot;&gt; = (&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt; basic&lt;span class=&quot;operator&quot;&gt;) /&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 100&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  PF&lt;span class=&quot;operator&quot;&gt; = (&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt; basic&lt;span class=&quot;operator&quot;&gt;) /&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 100&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  LD&lt;span class=&quot;operator&quot;&gt; = (&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt; loan&lt;span class=&quot;operator&quot;&gt;) /&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 100&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  allowance&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; HRA&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt; CA&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt; DA&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  deduction&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; PF&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt; LD&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  basic&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; days&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 30&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  LD&lt;span class=&quot;operator&quot;&gt; = (&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt; loan&lt;span class=&quot;operator&quot;&gt;) /&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 100&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  OT&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; hours&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  allowance&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; OT&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  deduction&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; LD&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 netsalary&lt;span class=&quot;operator&quot;&gt; = (&lt;/span&gt;basic&lt;span class=&quot;operator&quot;&gt; +&lt;/span&gt; allowance&lt;span class=&quot;operator&quot;&gt;) -&lt;/span&gt; deduction&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;36&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; basic&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;grade&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;E&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; HRA&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 14&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; CA&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; DA&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 19&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; PF&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; OT&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;22&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 18&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; LD&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;33&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Rs.&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; allowance&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;33&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 19&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Rs.&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; deduction&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;36&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 21&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; netsalary&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gotoxy&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 getch&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


//**********************************************************
// MAIN FUNCTION CALLING MAIN MENU
//**********************************************************
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
 MENU menu&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 menu&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;MAIN_MENU&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
program output&lt;br /&gt;
&lt;/span&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifdmkPSvorhDPtu6DtG0PRfDNsjQYsRhnF8xjPqUYdkUwCgsDBzpXFYNqoNkJHIoNKuilkkOULDWNeuw82spxiyWbkuiRWBOMcidfq8HxToPfDP9pZu6wJtaqRsHM8LS2U9mFRWeEuF5OD/s1600/payroll_management_cpp_project_source_code.PNG&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;img alt=&quot;Payroll management system project C++ source code&quot; border=&quot;0&quot; height=&quot;136&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifdmkPSvorhDPtu6DtG0PRfDNsjQYsRhnF8xjPqUYdkUwCgsDBzpXFYNqoNkJHIoNKuilkkOULDWNeuw82spxiyWbkuiRWBOMcidfq8HxToPfDP9pZu6wJtaqRsHM8LS2U9mFRWeEuF5OD/w400-h136/payroll_management_cpp_project_source_code.PNG&quot; title=&quot;Payroll management system project C++&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: medium; text-align: left;&quot;&gt;Payroll management c++ project main menu&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNaYCnXPXcSOCQVJbgVX68fBmwXajUNx26KAywnyXFUbPe_IZ80K63tTfVDRSLPu_wCseTYxpf2KNHJg8b9esZvwpMXJkeBCTdCNdcYgoS2AKXKXEokXB5lfZrJutvKjo5OlAPpYYg_4X9/s1600/payroll_management_cpp_project_source_code_output.PNG&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;img alt=&quot;Payroll management system project C++ source code ouput&quot; border=&quot;0&quot; height=&quot;148&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNaYCnXPXcSOCQVJbgVX68fBmwXajUNx26KAywnyXFUbPe_IZ80K63tTfVDRSLPu_wCseTYxpf2KNHJg8b9esZvwpMXJkeBCTdCNdcYgoS2AKXKXEokXB5lfZrJutvKjo5OlAPpYYg_4X9/s400/payroll_management_cpp_project_source_code_output.PNG&quot; title=&quot;&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Employee Details c++ project output&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;
Find more &lt;a href=&quot;https://fahad-cprogramming.blogspot.com/p/cpp-projects.html&quot; target=&quot;_blank&quot;&gt;c++ simple project source code&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/8757799005025506294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/02/payroll-management-system-project-c.html#comment-form' title='20 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/8757799005025506294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/8757799005025506294'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/02/payroll-management-system-project-c.html' title='Payroll management system project C++ source code'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifdmkPSvorhDPtu6DtG0PRfDNsjQYsRhnF8xjPqUYdkUwCgsDBzpXFYNqoNkJHIoNKuilkkOULDWNeuw82spxiyWbkuiRWBOMcidfq8HxToPfDP9pZu6wJtaqRsHM8LS2U9mFRWeEuF5OD/s72-w400-h136-c/payroll_management_cpp_project_source_code.PNG" height="72" width="72"/><thr:total>20</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-4221414354050067215</id><published>2017-02-02T14:57:00.000-08:00</published><updated>2017-02-02T15:03:15.554-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="pop"/><category scheme="http://www.blogger.com/atom/ns#" term="project"/><category scheme="http://www.blogger.com/atom/ns#" term="push"/><category scheme="http://www.blogger.com/atom/ns#" term="source"/><category scheme="http://www.blogger.com/atom/ns#" term="stack"/><title type='text'>c++ stack push pop example project</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;C++ stack push pop implementation source code&lt;/b&gt;. It uses two stacks, user can push pop to both using menu selection. Menu have options 0 to 9 for example push value to stack one , pop value to stack two, display both etc. Switch statement has used for menu options. Both are the size of 10 user can increase their size according to need. There is an option to build stack. It uses for loop to assign 5 values to each.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Concept used&lt;/b&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Stack push pop&lt;/li&gt;
&lt;li&gt;Dynamic memory allocation&lt;/li&gt;
&lt;li&gt;array&lt;/li&gt;
&lt;li&gt;for loop&lt;/li&gt;
&lt;li&gt;switch statement&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;#include &amp;lt;iostream&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;conio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
//////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; ts&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; len&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; top1&lt;span class=&quot;operator&quot;&gt; = -&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; top2&lt;span class=&quot;operator&quot;&gt; = -&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt; exp&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; new&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;ts&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt; stk1&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; new&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;len&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt; stk2&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; new&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;len&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

void&lt;/span&gt; inputexp&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; push1&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; push2&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; pop1&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; pop2&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; topitem1&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; topitem2&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; displaysk1&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; displaysk2&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; buildstack&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

/////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; menu&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; op&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
    system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;press 0 to enter array:\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;press 1 to push element to stack 1:\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;press 2 to push element to stack 2:\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;press 3 to get top stack 1:\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;press 4 to get top stack 2:\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;press 5 to pop from stack 1 and push in 2:\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;press 6 to pop from stack 2 and push in 1:\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;press 7 to display sk 1:\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;press 8 to display sk 2:\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;press 9 to build stack:\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;option:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; op&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    switch&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;op&lt;span class=&quot;operator&quot;&gt;) {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;

    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;: {&lt;/span&gt;
        inputexp&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
        menu&lt;span class=&quot;operator&quot;&gt;();
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;: {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
        int&lt;/span&gt; it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;enter value:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        push1&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
        menu&lt;span class=&quot;operator&quot;&gt;();
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;: {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
        int&lt;/span&gt; it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;enter value:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        push2&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
        menu&lt;span class=&quot;operator&quot;&gt;();
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;: {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
        int&lt;/span&gt; t&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        t&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; topitem1&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
        cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;top is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; t&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        menu&lt;span class=&quot;operator&quot;&gt;();
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;: {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
        int&lt;/span&gt; t&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        t&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; topitem2&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
        cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;top is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; t&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        menu&lt;span class=&quot;operator&quot;&gt;();
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;: {&lt;/span&gt;
        pop1&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
        menu&lt;span class=&quot;operator&quot;&gt;();
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;: {&lt;/span&gt;
        pop2&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
        menu&lt;span class=&quot;operator&quot;&gt;();
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 7&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;: {&lt;/span&gt;
        displaysk1&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
        menu&lt;span class=&quot;operator&quot;&gt;();
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:

    {&lt;/span&gt;
        displaysk2&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
        menu&lt;span class=&quot;operator&quot;&gt;();
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;: {&lt;/span&gt;
        buildstack&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;

        cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;stacks successfully built\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        menu&lt;span class=&quot;operator&quot;&gt;();
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    default&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
        cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;invalid\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
        break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
    }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //switch
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //funciton

/////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; push1&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt;)
{
    ++&lt;/span&gt;top1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    stk1&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;top1&lt;span class=&quot;operator&quot;&gt;] =&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt;;

}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //function
//////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; push2&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt;)
{
    ++&lt;/span&gt;top2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    stk2&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;top2&lt;span class=&quot;operator&quot;&gt;] =&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt;;

}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //function
///////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; pop1&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;

    ch&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; stk1&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;top1&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;
    push2&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
    top1&lt;span class=&quot;operator&quot;&gt;--;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //function
//////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; pop2&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;

    ch&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; stk2&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;top2&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;
    push1&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
    top2&lt;span class=&quot;operator&quot;&gt;--;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //function
//////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; topitem1&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    return&lt;/span&gt; stk1&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;top1&lt;span class=&quot;operator&quot;&gt;];
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //function
//////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; topitem2&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    return&lt;/span&gt; stk2&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;top2&lt;span class=&quot;operator&quot;&gt;];
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //function
//////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; inputexp&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;enter array:\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt; &amp;lt;&lt;/span&gt; ts&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;++) {&lt;/span&gt;
        cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; exp&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;];
    }&lt;/span&gt;
    exp&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;] =&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;\0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;successfully entered\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;array u entered is \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; j&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; j&lt;span class=&quot;operator&quot;&gt; &amp;lt;&lt;/span&gt; ts&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; j&lt;span class=&quot;operator&quot;&gt;++)&lt;/span&gt;
        cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; exp&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;j&lt;span class=&quot;operator&quot;&gt;] &amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //funciton
///////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; buildstack&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;

    for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; k&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; k&lt;span class=&quot;operator&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; k&lt;span class=&quot;operator&quot;&gt;++) {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
        if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;exp&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;k&lt;span class=&quot;operator&quot;&gt;] %&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;) {&lt;/span&gt;
            push1&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;exp&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;k&lt;span class=&quot;operator&quot;&gt;]);
        }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
        else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; {&lt;/span&gt;
            push2&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;exp&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;k&lt;span class=&quot;operator&quot;&gt;]);
        }
    }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //for
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //function
///////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; displaysk1&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;stack 1 is:\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; j&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; j&lt;span class=&quot;operator&quot;&gt; &amp;lt;=&lt;/span&gt; top1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; j&lt;span class=&quot;operator&quot;&gt;++) {&lt;/span&gt;
        cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; stk1&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;j&lt;span class=&quot;operator&quot;&gt;] &amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class=&quot;operator&quot;&gt;;
    }&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
///////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; displaysk2&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;stack 2 is:\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; k&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; k&lt;span class=&quot;operator&quot;&gt; &amp;lt;=&lt;/span&gt; top2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; k&lt;span class=&quot;operator&quot;&gt;++) {&lt;/span&gt;
        cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt; stk2&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;k&lt;span class=&quot;operator&quot;&gt;] &amp;lt;&amp;lt;&lt;/span&gt; endl&lt;span class=&quot;operator&quot;&gt;;
    }
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

////////////////////////////////

////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;

    menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;

    getch&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Sample Output:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;320&quot; height=&quot;266&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/YlUi64GD0wA/0.jpg&quot; src=&quot;https://www.youtube.com/embed/YlUi64GD0wA?feature=player_embedded&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2S0QW32Y5_O6ar9HVOIIF6pPUeeYllJ1ANt0agOGCOPbjQnnGCFiD4jdptTB0MCt5EJN7xDWKaovj-LXSdjhvByt-HywZEKiBscxj9ZRp0-T5FbXnjAm26AnwgSHMEhw_C88uu3yNEQmY/s1600/cpp_stack_push_pop_source_code_example.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c++ stack push pop example project&quot; border=&quot;0&quot; height=&quot;178&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2S0QW32Y5_O6ar9HVOIIF6pPUeeYllJ1ANt0agOGCOPbjQnnGCFiD4jdptTB0MCt5EJN7xDWKaovj-LXSdjhvByt-HywZEKiBscxj9ZRp0-T5FbXnjAm26AnwgSHMEhw_C88uu3yNEQmY/s320/cpp_stack_push_pop_source_code_example.PNG&quot; title=&quot;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This is a simple small c++ project code it can be edit or improve more its basic purpose is just to give the idea to how stack push pop works. How it can be implement in code using array, dynamic memory and others.&lt;br /&gt;
find &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/p/cpp-projects.html&quot; target=&quot;_blank&quot;&gt;more c++ simple projects and solution&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/4221414354050067215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/02/stack-push-pop-cpp-example-source-code.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/4221414354050067215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/4221414354050067215'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/02/stack-push-pop-cpp-example-source-code.html' title='c++ stack push pop example project'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/YlUi64GD0wA/default.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-3827136999675111934</id><published>2017-02-02T03:00:00.000-08:00</published><updated>2018-05-26T06:01:48.470-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="max"/><category scheme="http://www.blogger.com/atom/ns#" term="min"/><title type='text'>find minimum maximum and average c++ program </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Simple c++ program which takes input numbers from user and find minimum, maximum and average of numbers&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Program uses do while loop to find min, max and avg.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;User can input many numbers, condition is set for -1 to get results. You can set any number according to your wish.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;To calculate user has to break do while loop condition which breaks when user inputs -1.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;#include&amp;lt;iostream&amp;gt;
#include&amp;lt;conio.h&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    float&lt;/span&gt; max&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;float&quot;&gt;0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;min&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;float&quot;&gt;0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;sum&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;float&quot;&gt;0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    float&lt;/span&gt; num&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;float&quot;&gt;0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    float&lt;/span&gt; avg&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;float&quot;&gt;0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter a whole number or -1 to get result:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;             //program working through example
&lt;/span&gt;    cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;num&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                  
&lt;/span&gt;    max&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;num&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                   
&lt;/span&gt;    min&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;num&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                  
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
    {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;num&lt;span class=&quot;operator&quot;&gt;!=-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;){&lt;/span&gt;
        sum&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;sum&lt;span class=&quot;operator&quot;&gt;+&lt;/span&gt;num&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;        
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;        if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;num&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;max&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                 
&lt;/span&gt;        max&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;num&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                        
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;        else
        if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;num&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;min&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                    
&lt;/span&gt;        min&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;num&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                           
&lt;/span&gt;        cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter a whole number or -1 to get result:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;             
&lt;/span&gt;        cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;num&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                          
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;      }
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;num&lt;span class=&quot;operator&quot;&gt;!=-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                      
&lt;/span&gt;        avg&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;sum&lt;span class=&quot;operator&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;float&quot;&gt;10.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;sum=&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;sum&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;average of numbers you entered is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;avg&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;maximum number you enter is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;max&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;minimum number you enter is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;min&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
        getch&lt;span class=&quot;operator&quot;&gt;();
        }&lt;/span&gt;

&lt;/pre&gt;
&lt;br /&gt;
program output:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYQYnGHWIrwRKGFfq4N7HdNVVaYmvB3oGB6WcJu1rKlLSBmmPKAFxTljt5Vj_XILueQCTYLr3OVVCUX_cKwJed02yJGe9fRWKNOmRP_5Md-plYtTqD6jlDcxMjnrbsHMXutC5bUfcrT4dR/s1600/cpp_code_fin_min_max_avg_number.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;find min max number c++ code&quot; border=&quot;0&quot; height=&quot;191&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYQYnGHWIrwRKGFfq4N7HdNVVaYmvB3oGB6WcJu1rKlLSBmmPKAFxTljt5Vj_XILueQCTYLr3OVVCUX_cKwJed02yJGe9fRWKNOmRP_5Md-plYtTqD6jlDcxMjnrbsHMXutC5bUfcrT4dR/s320/cpp_code_fin_min_max_avg_number.PNG&quot; title=&quot;code output&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;find more examples here:&amp;nbsp;&lt;a href=&quot;http://fahad-cprogramming.blogspot.com/p/c-simple-examples.html&quot;&gt;c++ programming examples and solutions&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;find sample c++ projects here: &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/p/cpp-projects.html&quot; target=&quot;_blank&quot;&gt;c++ projects source codes&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;This example will help the beginner to refresh logic building muscle.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;It is recommended to practice these kinds of codes. Sometimes while programming our mind hesitate for some complex code and before going enough deep to understand and implement a good logic our mind return us back.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Doing these code practices will make your logic building ability fresh and when a complex problem needs to solve your mind will give you positive energy.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Yes go, deep dive into it you can do it.!!&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/3827136999675111934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/02/find-minimum-maximum-average-cpp-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/3827136999675111934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/3827136999675111934'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/02/find-minimum-maximum-average-cpp-code.html' title='find minimum maximum and average c++ program '/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYQYnGHWIrwRKGFfq4N7HdNVVaYmvB3oGB6WcJu1rKlLSBmmPKAFxTljt5Vj_XILueQCTYLr3OVVCUX_cKwJed02yJGe9fRWKNOmRP_5Md-plYtTqD6jlDcxMjnrbsHMXutC5bUfcrT4dR/s72-c/cpp_code_fin_min_max_avg_number.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-1344442517094934246</id><published>2017-02-01T09:56:00.000-08:00</published><updated>2017-02-01T10:23:37.978-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="alphabets"/><category scheme="http://www.blogger.com/atom/ns#" term="ASCII"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="do. while"/><title type='text'> Print alphabets from a to z c++ program do while</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
C++ simple program which displays alphabets from A to Z using do while loop. This program simply start the ASCII code from capital which is 65 and keep increment the ASCII code to Z. To do this a char variable is being used and initialized it form &#39;A&#39; then in while loop condition it checks till character &#39;Z&#39;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;comment&quot;&gt;//this program will print alphabets from A-Z.
&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;#include&amp;lt;iostream&amp;gt;
#include&amp;lt;conio.h&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                //working of program
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;    int&lt;/span&gt; character&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;            //initializing variable of type int from zero to remove garbage value
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;    char&lt;/span&gt; ch&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt;&#39;A&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                //initializing character type variable from first letter &#39;A&#39;
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    do&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                         //loop begins and steps 1-5 repeat till ch=Z
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;    {&lt;/span&gt;
         character&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   //1)character=int(A) =changes value of A to ascii code of type int so
                              // character=65
&lt;/span&gt;         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;     //2)print ch=A
&lt;/span&gt;         character&lt;span class=&quot;operator&quot;&gt;++;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;        //3)character=66
&lt;/span&gt;         ch&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;character&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //4)ch=char(66)=changes value of 66 to alphabet
                            // ch=B
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ch&lt;span class=&quot;operator&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt;&#39;Z&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;         //5)check if B&amp;lt;=Z
&lt;/span&gt;    getch&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
program output&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEgQcj_B0bzqHFoLpoW1eoUkK_u1giTgTmvHamVFCsk7u78kjZVnW3uYqVz6Qo6osvLqe6heMVijSiUaRJfqMqYeEjL0yW7Zkwv3JQmKJEM8OH82v4UmiCeOGA_ZtVBT0A0PnRXNs5OcoC/s1600/cpp_code_print_alphabets.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;print alphabets from z to z c++ code &quot; border=&quot;0&quot; height=&quot;185&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEgQcj_B0bzqHFoLpoW1eoUkK_u1giTgTmvHamVFCsk7u78kjZVnW3uYqVz6Qo6osvLqe6heMVijSiUaRJfqMqYeEjL0yW7Zkwv3JQmKJEM8OH82v4UmiCeOGA_ZtVBT0A0PnRXNs5OcoC/s320/cpp_code_print_alphabets.PNG&quot; title=&quot;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Try this code to print lower case alphabets from a to z. Hint ASCII code of &amp;nbsp;&#39;a&#39; is 97.&lt;br /&gt;
&lt;br /&gt;
Find more example here: &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/p/c-simple-examples.html&quot;&gt;c++ programming examples and solutions&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/1344442517094934246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/02/print-alphabets-from-to-z-cpp-program-do-while.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/1344442517094934246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/1344442517094934246'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/02/print-alphabets-from-to-z-cpp-program-do-while.html' title=' Print alphabets from a to z c++ program do while'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEgQcj_B0bzqHFoLpoW1eoUkK_u1giTgTmvHamVFCsk7u78kjZVnW3uYqVz6Qo6osvLqe6heMVijSiUaRJfqMqYeEjL0yW7Zkwv3JQmKJEM8OH82v4UmiCeOGA_ZtVBT0A0PnRXNs5OcoC/s72-c/cpp_code_print_alphabets.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-6263319719041635810</id><published>2017-01-29T12:22:00.001-08:00</published><updated>2017-01-29T12:22:17.006-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="series"/><category scheme="http://www.blogger.com/atom/ns#" term="while loop in c++"/><title type='text'>find sum of series c++ code</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Find sum of given series in which user enter a number and program calculate series using while loop.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Series example:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;if input number = 100&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;1/1 +1/2 +1/4 +.......+ 1/100&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;comment&quot;&gt;//this program will calculate sum of following series
// 1/1 +1/2 +1/4 +.......+ 1/100.
&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;#include&amp;lt;iostream&amp;gt;
#include&amp;lt;conio.h&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    float&lt;/span&gt; n&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;float&quot;&gt;1.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    float&lt;/span&gt; d&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;float&quot;&gt;2.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    float&lt;/span&gt; sum&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;float&quot;&gt;1.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    float&lt;/span&gt; temp&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;float&quot;&gt;0.0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter a number:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; number&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;number&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;d&lt;span class=&quot;operator&quot;&gt;&amp;lt;=&lt;/span&gt;number&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                    //loop will start from denominator=2 &amp;amp; steps 1,2 &amp;amp;3 continues till d=100.
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;    {&lt;/span&gt;
      temp&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;/&lt;/span&gt;d&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                     // 1) temp=1/2=0.5
&lt;/span&gt;      sum&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;sum&lt;span class=&quot;operator&quot;&gt;+&lt;/span&gt;temp&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                 // 2) sum=1+0.5=1.5
&lt;/span&gt;      d&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;d&lt;span class=&quot;operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                        // 3) d=2+2=4
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;      }&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;sum of series is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;sum&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      getch&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
      return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;

}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5Dh14ajPLLdDR1beJp2ox64qSshMXAkruBEXFlD9sKRATYN9v4bZWA8KOCMDxNYyYXxMyiBoHrKt-v2agT3BMh7nYJpM0GIZnkmu_tXhy2g4JWzRCxvDLPM9gqMYMSMOqkQzhNSVdPTQu/s1600/sum_of_series_cpp_code.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;find sum of series c++ code&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5Dh14ajPLLdDR1beJp2ox64qSshMXAkruBEXFlD9sKRATYN9v4bZWA8KOCMDxNYyYXxMyiBoHrKt-v2agT3BMh7nYJpM0GIZnkmu_tXhy2g4JWzRCxvDLPM9gqMYMSMOqkQzhNSVdPTQu/s1600/sum_of_series_cpp_code.PNG&quot; title=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;It is recommended to dry run the code on paper and changes the series to understand more.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Find more example here: &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/p/c-simple-examples.html&quot; target=&quot;_blank&quot;&gt;c++ simple examples source codes&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/6263319719041635810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/01/find-sum-of-series-c-code.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/6263319719041635810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/6263319719041635810'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/01/find-sum-of-series-c-code.html' title='find sum of series c++ code'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5Dh14ajPLLdDR1beJp2ox64qSshMXAkruBEXFlD9sKRATYN9v4bZWA8KOCMDxNYyYXxMyiBoHrKt-v2agT3BMh7nYJpM0GIZnkmu_tXhy2g4JWzRCxvDLPM9gqMYMSMOqkQzhNSVdPTQu/s72-c/sum_of_series_cpp_code.PNG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-4500265862586967431</id><published>2017-01-25T12:53:00.001-08:00</published><updated>2017-01-25T12:55:07.988-08:00</updated><title type='text'>c++ multiplication table using while loop example</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;C++ simple program which uses while loop to print a multiplication table in a proper format. User inputs a number for table then limit.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;program has tested on code blocks c++ compiler.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;source code:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;#include&amp;lt;iostream&amp;gt;
#include&amp;lt;conio.h&amp;gt;
#include&amp;lt;iomanip&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; n&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;limit&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter number to print its table=&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter limit=&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;limit&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;&amp;lt;=&lt;/span&gt;limit&lt;span class=&quot;operator&quot;&gt;)
    {&lt;/span&gt;
       cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; * &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;setw&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&amp;lt;&amp;lt;&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; = &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;setw&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&amp;lt;&amp;lt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
       c&lt;span class=&quot;operator&quot;&gt;++;
    }&lt;/span&gt;

getch&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;
&lt;/pre&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;program output:&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoS9leiSd21dpn3zqHuj6y6pZX4eubuqc2Bp9lV73oKrH5Ab1suzZ3iXJJyVzHHP3Jvf6rhJ9Nk-il7h15zZIK5B0DlpFcM0u9K5Tmyb98bZTl15GF8rURRdOOXFGlDRGv26SDSAGGBDWx/s1600/while_loop_cpp_example.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;c++ multiplication table using while loop example output&quot; border=&quot;0&quot; height=&quot;211&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoS9leiSd21dpn3zqHuj6y6pZX4eubuqc2Bp9lV73oKrH5Ab1suzZ3iXJJyVzHHP3Jvf6rhJ9Nk-il7h15zZIK5B0DlpFcM0u9K5Tmyb98bZTl15GF8rURRdOOXFGlDRGv26SDSAGGBDWx/s320/while_loop_cpp_example.PNG&quot; title=&quot;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
find more examples here: &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/p/c-simple-examples.html&quot; target=&quot;_blank&quot;&gt;C++ simple examples with source codes&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/4500265862586967431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/01/multiplication-table-using-while-loop.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/4500265862586967431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/4500265862586967431'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/01/multiplication-table-using-while-loop.html' title='c++ multiplication table using while loop example'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoS9leiSd21dpn3zqHuj6y6pZX4eubuqc2Bp9lV73oKrH5Ab1suzZ3iXJJyVzHHP3Jvf6rhJ9Nk-il7h15zZIK5B0DlpFcM0u9K5Tmyb98bZTl15GF8rURRdOOXFGlDRGv26SDSAGGBDWx/s72-c/while_loop_cpp_example.PNG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-7306288300587150857</id><published>2017-01-20T14:47:00.000-08:00</published><updated>2017-01-23T13:33:27.761-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linked"/><category scheme="http://www.blogger.com/atom/ns#" term="list"/><category scheme="http://www.blogger.com/atom/ns#" term="project"/><category scheme="http://www.blogger.com/atom/ns#" term="student"/><title type='text'>Linked list in C++ project example student record</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Project introduction and scope&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;It is a simple c++ project for Student Information System. It gives a simple example of a complete system with the functionality of add record, search record, Update record and delete record using linked list. If students understand basic CRUD (Create, Read, Update and Delete) functionality it would be easy for them to create any Management System using this functionality.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;It uses the concept of following topics:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://fahad-cprogramming.blogspot.com/2015/03/learn-pointers-in-c-programming-with.html&quot; target=&quot;_blank&quot;&gt;Pointers&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Loops&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Functions&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Linked List&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;If Else&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;The Project has 5 major function in menu&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Add New record&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Search a record&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Modify a record&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Delete a record&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Exit&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;How it Works&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;The menu is handled by if else statement. While adding a new record, if any node already exist then new node is connected with it otherwise a new node is created. While searching a node, a pointer searches all the pointers of linked lists to match the required data from start to end. While Modification the data part of the linked list is overwritten with new data and in case of Deletion, the pointers before and after of the node which we need to delete are connected with each other.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;#include&amp;lt;conio.h&amp;gt;
#include&amp;lt;iostream&amp;gt;
#include&amp;lt;fstream&amp;gt;
#include&amp;lt;Windows.h&amp;gt;
#include&amp;lt;dos.h&amp;gt;
#include&amp;lt;cctype&amp;gt;
#include&amp;lt;sstream&amp;gt;
#include&amp;lt;string&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
bool&lt;/span&gt; check&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;bool&quot;&gt; true&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
struct&lt;/span&gt; node&lt;span class=&quot;comment&quot;&gt;    //structure of node //
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt; name&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt; discipline&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; rollNo&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt; section&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 node&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;
}*&lt;/span&gt;head&lt;span class=&quot;operator&quot;&gt;,*&lt;/span&gt;lastptr&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

void&lt;/span&gt; add&lt;span class=&quot;operator&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;    //Adds record of student//
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;{&lt;/span&gt;
 node&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 p&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;new&lt;/span&gt; node&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter name of student:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;name&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 fflush&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;stdin&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter discipline of student:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;discipline&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 fflush&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;stdin&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter Roll Number of student:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;rollNo&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 fflush&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;stdin&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter section of student:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;section&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 fflush&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;stdin&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 p&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;

 if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;check&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  head&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; p&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  lastptr&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; p&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  check&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;bool&quot;&gt; false&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  lastptr&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  lastptr&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Recored Entered&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 getch&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; modify&lt;span class=&quot;operator&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   //modifies record of student//
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;{&lt;/span&gt;
 node&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;ptr&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 node&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;prev&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 node&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; roll_no&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter Roll Number to search:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;roll_no&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 prev&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;head&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 current&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;head&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;rollNo&lt;span class=&quot;operator&quot;&gt;!=&lt;/span&gt;roll_no&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  prev&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  current&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 ptr&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;new&lt;/span&gt; node&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 fflush&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;stdin&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter name of student:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ptr&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;name&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 fflush&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;stdin&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter discipline of student:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 gets&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;ptr&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;discipline&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 fflush&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;stdin&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter Roll Number of student:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;ptr&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;rollNo&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 fflush&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;stdin&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter section of student:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;ptr&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;section&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 fflush&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;stdin&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 prev&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;ptr&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 ptr&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
 delete&lt;/span&gt; current&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Recored Modified&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 getch&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; search&lt;span class=&quot;operator&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   //searches record of student//
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;{&lt;/span&gt;
 node&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;prev&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 node&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; roll_no&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter Roll Number to search:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;roll_no&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 prev&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;head&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 current&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;head&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;rollNo&lt;span class=&quot;operator&quot;&gt;!=&lt;/span&gt;roll_no&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  prev&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  current&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\nname: &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 puts&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;name&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\nRoll No:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;rollNo&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\nDiscipline:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 puts&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;discipline&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\nSection:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;section&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 getch&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; del&lt;span class=&quot;operator&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;    //deletes record of a student//
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;{&lt;/span&gt;
 node&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;ptr&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 node&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;prev&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 node&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 int&lt;/span&gt; roll_no&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter Roll Number to Delete:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;roll_no&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 prev&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;head&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 current&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;head&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;rollNo&lt;span class=&quot;operator&quot;&gt;!=&lt;/span&gt;roll_no&lt;span class=&quot;operator&quot;&gt;)
 {&lt;/span&gt;
  prev&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  current&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;
 }&lt;/span&gt;
 prev&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt; current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 current&lt;span class=&quot;operator&quot;&gt;-&amp;gt;&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;NULL&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
 delete&lt;/span&gt; current&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Recored Deleted&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 getch&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 char&lt;/span&gt; x&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\t\t ********************************* \t\t\t&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\t\t ****STUDENT MANAGEMENT SYSTEM**** \t\t\t&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\t\t ********************************* \t\t\t&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;……………………………………..&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;…………………&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;…………………………………………………….&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\n\nPress Any Key To Continue . . . .&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
 getch&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
 {&lt;/span&gt;
  system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;1---&amp;gt;Press &#39;1&#39; to add New record:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;2---&amp;gt;Press &#39;2&#39; to search a record:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;3---&amp;gt;Press &#39;3&#39; to modify a record:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;4---&amp;gt;Press &#39;4&#39; to delete a record:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;5---&amp;gt;Press &#39;5&#39; to exit:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  x&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;getch&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt;&#39;1&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   add&lt;span class=&quot;operator&quot;&gt;();
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt;&#39;2&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   search&lt;span class=&quot;operator&quot;&gt;();
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt;&#39;3&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   modify&lt;span class=&quot;operator&quot;&gt;();
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt;&#39;4&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   del&lt;span class=&quot;operator&quot;&gt;();
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;char&quot;&gt;&#39;5&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
  {&lt;/span&gt;
   exit&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
  {
  }
 }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;operator&quot;&gt; !=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 27&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
 getch&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;

&lt;/pre&gt;
&lt;pre&gt;Sample output&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6DyF5MJYkb2_SNood-bhAeryB4VqScs8_LGHIRfdFi8_2iJzMAAj7EA2KOjwUcsqoCTi3ny8pBOHfRtl1qWwSeI6qvw7Bj_LSFrsMztGnMv5cPsuyTg6WmmJQLhaAy7ddfeYSOWcFVIJj/s1600/linked_list_cpp_project_student_example.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Linked list in C++ project example student record&quot; border=&quot;0&quot; height=&quot;181&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6DyF5MJYkb2_SNood-bhAeryB4VqScs8_LGHIRfdFi8_2iJzMAAj7EA2KOjwUcsqoCTi3ny8pBOHfRtl1qWwSeI6qvw7Bj_LSFrsMztGnMv5cPsuyTg6WmmJQLhaAy7ddfeYSOWcFVIJj/s320/linked_list_cpp_project_student_example.PNG&quot; title=&quot;Linked list in C++&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;show project menu&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/pre&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijekrmtXUHgNsxoIJpiIu_r948onHJ01l6EIZrWPzP1jOJbMXW9FbpcrLQk2oniVO6usd0JosOpZYhCoyQ5BMjZXehg-HHdPlSp3iANJUufogKXSCSidqusBx90g5qP9HB8kPxEHO4IcBI/s1600/cpp_project_student_example.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Linked list in C++ project example student information&quot; border=&quot;0&quot; height=&quot;197&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijekrmtXUHgNsxoIJpiIu_r948onHJ01l6EIZrWPzP1jOJbMXW9FbpcrLQk2oniVO6usd0JosOpZYhCoyQ5BMjZXehg-HHdPlSp3iANJUufogKXSCSidqusBx90g5qP9HB8kPxEHO4IcBI/s320/cpp_project_student_example.PNG&quot; title=&quot;C++ project example student record&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Code has been tested on&amp;nbsp;code Blocks&amp;nbsp;C++ compiler.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;find &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/p/cpp-projects.html&quot; target=&quot;_blank&quot;&gt;more c++ simple projects&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/7306288300587150857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/01/linked-list-cpp-project-example.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/7306288300587150857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/7306288300587150857'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2017/01/linked-list-cpp-project-example.html' title='Linked list in C++ project example student record'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6DyF5MJYkb2_SNood-bhAeryB4VqScs8_LGHIRfdFi8_2iJzMAAj7EA2KOjwUcsqoCTi3ny8pBOHfRtl1qWwSeI6qvw7Bj_LSFrsMztGnMv5cPsuyTg6WmmJQLhaAy7ddfeYSOWcFVIJj/s72-c/linked_list_cpp_project_student_example.PNG" height="72" width="72"/><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-8889984417545846477</id><published>2016-12-28T12:42:00.000-08:00</published><updated>2016-12-28T12:42:45.103-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c programming projects"/><category scheme="http://www.blogger.com/atom/ns#" term="calculator"/><category scheme="http://www.blogger.com/atom/ns#" term="functions"/><category scheme="http://www.blogger.com/atom/ns#" term="switch"/><title type='text'>calculator program in c++ using functions</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Write a program for a simple c++ calculator which have different functions for different operations&lt;/b&gt;. Make a menu base selection screen using switch statement. Ever operation should have its own function. This code may also be use as a mini project to start.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Calculator should have following operations.&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Addition&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Subtraction&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Multiplication&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;Division&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Square root&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Factorial&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Exponential&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;
This code has been tested on Code blocks c++ compiler&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;C++ Source Code:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;#include&amp;lt;iostream&amp;gt;
#include&amp;lt;conio.h&amp;gt;
#include&amp;lt;math.h&amp;gt;
#include&amp;lt;stdlib.h&amp;gt;
#include&amp;lt;iomanip&amp;gt;
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;  char&lt;/span&gt; op&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; sum&lt;span class=&quot;operator&quot;&gt;()
   {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     
    int&lt;/span&gt; sum&lt;span class=&quot;operator&quot;&gt; =&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; n&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; numberitems&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt; &amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter number of items: \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cin&lt;span class=&quot;operator&quot;&gt; &amp;gt;&amp;gt;&lt;/span&gt; numberitems&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;

    for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;numberitems&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)
    {&lt;/span&gt;
        cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &quot;Enter number &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;:\n\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ;&lt;/span&gt;
        cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; 
        sum&lt;span class=&quot;operator&quot;&gt;+=&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;;
    }&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;sum is: &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; sum&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;
    
    }&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; diff&lt;span class=&quot;operator&quot;&gt;()
    {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; diff&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; n1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;n2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter two numbers to find their difference:\n\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter first number:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;n1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\nenter second number:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;n2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     diff&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;n1&lt;span class=&quot;operator&quot;&gt;-&lt;/span&gt;n2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\ndifference is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;diff&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     
void&lt;/span&gt; pro&lt;span class=&quot;operator&quot;&gt;()
    
    {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; pro&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; n&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; numberitems&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter number of items:\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;numberitems&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;=&lt;/span&gt;numberitems&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)
     {&lt;/span&gt;
             cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\nenter item &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
             cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
             pro&lt;span class=&quot;operator&quot;&gt;*=&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;
             
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;product is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;pro&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;    
     }&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
       
 void&lt;/span&gt; div&lt;span class=&quot;operator&quot;&gt;()
     {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
      int&lt;/span&gt; div&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
      int&lt;/span&gt; n1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
      int&lt;/span&gt; n2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter 2 numbers to find their quotient\n\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter numerator:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;n1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\nenter denominator:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;n2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      div&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;n1&lt;span class=&quot;operator&quot;&gt;/&lt;/span&gt;n2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\nquotient is:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;div&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;
      }&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;      

void&lt;/span&gt; power&lt;span class=&quot;operator&quot;&gt;()
     {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;     
     long int&lt;/span&gt; p&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; res&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt; 
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter number:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\nenter power:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;=&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)
     {&lt;/span&gt;
      res&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;res&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\n power &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; is :&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;res&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; 
       
void&lt;/span&gt; sq&lt;span class=&quot;operator&quot;&gt;()
     {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     float&lt;/span&gt; s&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; n&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter number to find its square root:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     s&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;sqrt&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\nsquare root of &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; is :&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;s&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
 void&lt;/span&gt; fact&lt;span class=&quot;operator&quot;&gt;()
     {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
      long int&lt;/span&gt; f&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
      int&lt;/span&gt; c&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter number to find its factorial:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
      while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;&amp;lt;=&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;)
      {&lt;/span&gt;
                 f&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;f&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;c&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
                 c&lt;span class=&quot;operator&quot;&gt;+=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
      }&lt;/span&gt;     
                 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\nfactorial of &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; is :&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;f&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;     
      }&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; expo&lt;span class=&quot;operator&quot;&gt;()
     {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
          long double&lt;/span&gt; res&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; 
     double&lt;/span&gt; e&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;float&quot;&gt;2.718281828&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;     
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter power of exponential function:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;=&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)
     {&lt;/span&gt;
      res&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;e&lt;span class=&quot;operator&quot;&gt;*&lt;/span&gt;res&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; e^ &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;p&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; is :&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;res&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;
           
           }&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;   
    
    
    system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
    {&lt;/span&gt;
                
    system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;              
    system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;    
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;***which operation you want to perform***\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 0 for exit\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 1 for addition \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 2 for subtraction\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 3 for multiplication\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 4 for division\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 5 for power calculation\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 6 for square root \n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 7 for factorial calculation\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 8 for exponential calculation\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press option:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;op&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    switch&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;op&lt;span class=&quot;operator&quot;&gt;)
    {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              case&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;1&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
              sum&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              
              break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              case&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;2&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
              diff&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              case&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;3&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
              pro&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              case&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;4&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
              div&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              case&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;5&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
              power&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              case&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;6&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
              sq&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              case&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;7&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
              fact&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              case&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;8&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
              expo&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     
              case&lt;/span&gt;&lt;span class=&quot;char&quot;&gt; &#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
              exit&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    
              default&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
              cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;invalid input&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;  ;&lt;/span&gt;
              system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);
    } 
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
                                                                         
    while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;op&lt;span class=&quot;operator&quot;&gt;!=&lt;/span&gt;&lt;span class=&quot;char&quot;&gt;&#39;0&#39;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
                    
                    getch&lt;span class=&quot;operator&quot;&gt;();
                    }&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Program output video&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;320&quot; height=&quot;266&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/cXvIR9HCGzg/0.jpg&quot; src=&quot;https://www.youtube.com/embed/cXvIR9HCGzg?feature=player_embedded&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Image output&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtne8HQgwmYP_YocjG07DDyxquRlfEUVV0z0YqTP7oh3PB2OygPSpIa55ujWNJGHUwfQCsAdYfG2c8ho2ccjW-W73cAp_DP97XbKqeI1OR3zxcBwmcfc7iDSzK8CfXOoMnf8p5H6UB9-Y6/s1600/cplusplus_calculator_source_code.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;simple calculator source code c++ using while loop functions and switch&quot; border=&quot;0&quot; height=&quot;169&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtne8HQgwmYP_YocjG07DDyxquRlfEUVV0z0YqTP7oh3PB2OygPSpIa55ujWNJGHUwfQCsAdYfG2c8ho2ccjW-W73cAp_DP97XbKqeI1OR3zxcBwmcfc7iDSzK8CfXOoMnf8p5H6UB9-Y6/s320/cplusplus_calculator_source_code.PNG&quot; title=&quot;simple calculator souirce code c++&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;output on code blocks console&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Find more examples here: &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/p/c-simple-examples.html&quot; target=&quot;_blank&quot;&gt;C++ simple example source code and explanation with dry run&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/8889984417545846477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2016/12/calculator-program-in-c-using-functions.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/8889984417545846477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/8889984417545846477'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2016/12/calculator-program-in-c-using-functions.html' title='calculator program in c++ using functions'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/cXvIR9HCGzg/default.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-3642232697768794688</id><published>2016-12-24T13:09:00.000-08:00</published><updated>2016-12-28T09:07:45.232-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="do while loop in c++"/><category scheme="http://www.blogger.com/atom/ns#" term="Fibonacci series in c++"/><category scheme="http://www.blogger.com/atom/ns#" term="while"/><title type='text'>fibonacci series number c++ using while loop example</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;A program can be coded in different ways and this example shows &lt;b&gt;how to find a number which is in Fibonacci series or not using do while loop&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;To read more visit&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #0000ee; font-size: large;&quot;&gt;&lt;u&gt;Wikipedia&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;For example 5 is in Fibonacci&amp;nbsp;series where 6 is not&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;To make it more easy to understand this example shows a dry run in comments at line by line. Hope it will help to understand.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;This program covers the concept of &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/2012/10/loops-in-c-while-loop.html&quot; target=&quot;_blank&quot;&gt;while loop&lt;/a&gt; and &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/2012/06/if-and-nested-if-statements-in-c.html&quot; target=&quot;_blank&quot;&gt;if statement&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Program has tested on code blocks&amp;nbsp;compiler.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;C++ source code:&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;pre&quot;&gt;#include &amp;lt;iostream&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;
using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; n&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;Enter a number to check if it is a fibonacci number: &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;         // 1)let n=9
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;  // 2)check if 9=0 or 9=1 (NOT)
&lt;/span&gt;     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; is a fibonacci number\n\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;     //skip
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     else&lt;/span&gt;
     a&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;        // 3) a=0 , b=1
&lt;/span&gt;     next&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;+&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;       // 4) next=0+1=1
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   // 5)loop starts from 1 and continues till next is less then 9
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;     {&lt;/span&gt;
        a&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;         // 6) a=1      ,9) a=1   ,12)a=2  ,15) a=3   ,18)a=5
&lt;/span&gt;        b&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;      // 7) b=1      ,10)b=2   ,13)b=3  ,16) b=5   ,19)b=8
&lt;/span&gt;        next&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;+&lt;/span&gt;b&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;    // 8)next=1+1=2   ,11)next=1+2=3   ,14)next=2+3=5   ,17)next=3+5=8
                     // 18)next=5+8=13 (loop ends)
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;     }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;next&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;     // 19)check if 13==9 (NOT)
&lt;/span&gt;    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; is a fibonacci number&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;      //skip
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    else&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;n&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; is not a fibonacci number&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; // 20)prints that 9 is not a fibonacci number.
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;
&lt;/pre&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;program image:&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif14srExwxKNbVmaLi3fX-xjQ-dy7cOVooiL8S65molCZDew75SrdUKTTZatWdVW4XjCqWAqhyMOEg_zf_1DBaArjxSCMk8uD4_Z8hnP04kEWvSAWyt1tSlIjj-pH9CdLI3nl-CqY2R9jw/s1600/source_code_find_fibonacci_number_cpp.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;source code find Fibonacci number c++&quot; border=&quot;0&quot; height=&quot;347&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif14srExwxKNbVmaLi3fX-xjQ-dy7cOVooiL8S65molCZDew75SrdUKTTZatWdVW4XjCqWAqhyMOEg_zf_1DBaArjxSCMk8uD4_Z8hnP04kEWvSAWyt1tSlIjj-pH9CdLI3nl-CqY2R9jw/s640/source_code_find_fibonacci_number_cpp.PNG&quot; title=&quot;source code find Fibonacci number c++&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;c++ Fibonacci number source code&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Program input output:&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiCrcWO_tLbTKjU6U3sAzTsixCZGltzBuq-T5cBTU1gc6WWNxmMFKf9tL_PVP5V73g9-SGa8ckVt4tr7Jf4r_DIINQPOQq3eTNpJ8QctZQJaW4ECSn0m3IXqegLQAhjTZvCtkxERod5zO_/s1600/find_number_in_fibonacci_series_cpp_source_code.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;program input output source code find Fibonacci number c++&quot; border=&quot;0&quot; height=&quot;132&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiCrcWO_tLbTKjU6U3sAzTsixCZGltzBuq-T5cBTU1gc6WWNxmMFKf9tL_PVP5V73g9-SGa8ckVt4tr7Jf4r_DIINQPOQq3eTNpJ8QctZQJaW4ECSn0m3IXqegLQAhjTZvCtkxERod5zO_/s320/find_number_in_fibonacci_series_cpp_source_code.PNG&quot; title=&quot;input output&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;input = 5&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;see also: &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/2013/07/c-program-to-find-fibonaaci-series-with.html&quot; target=&quot;_blank&quot;&gt;Fibonacci series in c++ source code with logic explanation&lt;/a&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/3642232697768794688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2016/12/fibonacci-series-number-finder-cpp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/3642232697768794688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/3642232697768794688'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2016/12/fibonacci-series-number-finder-cpp.html' title='fibonacci series number c++ using while loop example'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif14srExwxKNbVmaLi3fX-xjQ-dy7cOVooiL8S65molCZDew75SrdUKTTZatWdVW4XjCqWAqhyMOEg_zf_1DBaArjxSCMk8uD4_Z8hnP04kEWvSAWyt1tSlIjj-pH9CdLI3nl-CqY2R9jw/s72-c/source_code_find_fibonacci_number_cpp.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-3734473792048939576</id><published>2016-10-21T16:44:00.000-07:00</published><updated>2017-01-23T13:16:02.798-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="c++ stack code"/><category scheme="http://www.blogger.com/atom/ns#" term="project"/><category scheme="http://www.blogger.com/atom/ns#" term="stack functions"/><title type='text'>stack implementation in c++ using array source code</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;

&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Stack in C++ program&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;This c++ program has 10 functions. Each function calls on menu based selection using switch statement (functions names may very in source code). Each function and whole code has proper commented to explain the code. &amp;nbsp;This program has been tested on Visual Studio IDE.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;What is a stack?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Stack is know as LIFO(Last in First Out) functionality&lt;/b&gt; which means a thing or an object which has been added last time will out first. Like Placing books on one an other the last book we placed will be picked first to collect all books. To now more about &lt;b&gt;stack in c++ &lt;a href=&quot;https://en.wikipedia.org/wiki/Stack&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;read wiki&amp;nbsp;&lt;/a&gt;.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;List of Stack Functions&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;void createStack();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;void menu();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;void display();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;void deleteStack();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;void clearStack(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // declaration of functions&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;int pop();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;void push(int);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;void findelement();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;int isfull();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;int isempty();&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;void find_by_position();&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Program brief introduction&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Every function will be called on&lt;b&gt; menu based selection&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;An integer pointer has declared for &lt;b&gt;dynamic memory allocation&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Global variable size and top has declared to track the &lt;b&gt;stack status in whole program&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;C++ Source Code&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;#include&amp;lt;iostream&amp;gt;
#include&amp;lt;conio.h&amp;gt;
#include&amp;lt;stdlib.h&amp;gt;
#include&amp;lt;stdio.h&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; top&lt;span class=&quot;operator&quot;&gt;=-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                         // -1 shows that stack is not created
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; size&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                         // initial size is zero
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;stk&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;             // initialization of dynamic array of typ int [works as stack]
/////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; createstk&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; display&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; deletestk&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; clearstk&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                     // declaration of functions 
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; pop&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; push&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; findelement&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; isfull&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; checkIndex&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; find_by_position&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
 /////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; menu&lt;span class=&quot;operator&quot;&gt;()                      
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; option&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
     system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; 
     while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;option&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt;option&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                             // continue till we select option from 1-10
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;     {&lt;/span&gt;       
     system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt; 
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 0 to find element by position\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 1 to create stack\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 2 to display stack\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 3 to clear stack\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 4 to delete stack\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;                    
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 5 to find element in stack\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;        
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 6 to remove element from stack\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 7 to add element in stack\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 8 to check whether stack is full\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 9 to check whether stack is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 10 to exit\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;option&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     
     
     switch&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;option&lt;span class=&quot;operator&quot;&gt;)
     {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
      case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
      find_by_position&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
      break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;flow&quot;&gt;
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
     createstk&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
     display&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
     clearstk&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
     deletestk&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    
     
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
     findelement&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    
     
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
     {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                  // check to see if stack is created or not
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;isempty&lt;span class=&quot;operator&quot;&gt;()==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                     // check to see if stack is empty 
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     else&lt;/span&gt; 
     pop&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                        // pop element
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;     }&lt;/span&gt;
     menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 7&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
     {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;                 
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                   // check to see if stack is created or not
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     else 
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;isfull&lt;span class=&quot;operator&quot;&gt;()==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; )&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack is full\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                       //check to see if stack is full 
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     else&lt;/span&gt; 
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter element to push on stack:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;       // take element to push on stack if it is not full
&lt;/span&gt;     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;           
     push&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;);                         
     }&lt;/span&gt;
     menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     
     
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
     {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;      
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                        //check to see if stack is created or not
&lt;/span&gt;     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else&lt;/span&gt;
     isfull&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                         //calling isfull funtion
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack is full\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                         //if isfull function returns 1 (true) then stack is full
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     else&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack is not full\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                     //else stack is not full
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;     }&lt;/span&gt;
     menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     
     
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
     {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;                                     
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                    //check to see if stack is created or not
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     else&lt;/span&gt;
     isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                      //calling isempty function
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                        //if isempty function returns 1(true) then stack is empty
&lt;/span&gt;     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack is not empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                  //else stack is not empty
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;     }&lt;/span&gt; 
     menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
 
          
                       
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
     exit&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                       //calling default built in function to exit program
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     
     
     default&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;invalid option&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
     }    
     }
     }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
 ///////////////////////////////////////////////////////////////////////////////////////////    
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; void&lt;/span&gt; createstk&lt;span class=&quot;operator&quot;&gt;()        
 {&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter total size of stack:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;size&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;     
   stk&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;size&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                        // take total size of stack
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
     {&lt;/span&gt;
           
                         
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;how many elements do you want to enter?\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;     //take current size of stack that we are going to use yet
&lt;/span&gt;     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;;
                         
     }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;size&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                               //prompt to enter current size till size entered is less then 1
                                                           // or greater then total size
&lt;/span&gt;                                                           
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter elements\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;                             
     for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                //for loop from index 0 to current size (top)
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;     {&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;stk&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                          //input value in stack
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;     
     }&lt;/span&gt;    
     menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                               //function call to enter main menu again
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;     }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; 
///////////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; display&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                         //check to see if stack is created
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     else&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;total number of elements in stack are :&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;       //displays total number of elements in stack
                                                                //by diplaying current value of top
&lt;/span&gt;     
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;\nand are as follows\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;                           
                                                                                      
                                                                                      
     for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                 //loop from 0 index to top
&lt;/span&gt;     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;stk&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;]&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                    //displays value in stack 
&lt;/span&gt;     getch&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
     menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                              //function call to enter main menu again
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

////////////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; clearstk&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                          //check to see if stack is created or not
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     else&lt;/span&gt;
     top&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                               //if stack is created then make top=0 and clear it
&lt;/span&gt;     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack is cleared\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     menu&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;


////////////////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt;  deletestk&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
      if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                       //check to see if stack is created or not
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;      else&lt;/span&gt;
      top&lt;span class=&quot;operator&quot;&gt;=-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
      cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack is deleted\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                        //if stack is created then make top=-1 and delete it
&lt;/span&gt;      menu&lt;span class=&quot;operator&quot;&gt;();
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
 ///////////////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; findelement&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; item&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;temp&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                 //initialize temp variable from 0 + intializing variable to enter item
                                                        //to be found + intitailaizing counter variable &#39;i&#39;
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                      //check to see if stack is created or not
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
     {&lt;/span&gt;
     
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter item you want to find\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;item&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                        //input item to be found in stack
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; m&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;m&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;m&lt;span class=&quot;operator&quot;&gt;++)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                //loop starts from zero index and continue upto top
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;     {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
             if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;stk&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;m&lt;span class=&quot;operator&quot;&gt;]==&lt;/span&gt;item&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                          //compare each content of stack with value entere
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;    {&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item found at &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;m&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     temp&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
             }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
                                                //if item found then change value of temp to false the condition
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;             
             
     
     }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
                                                     //control comes out of loop
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;temp&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
    {&lt;/span&gt;
    
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item not found\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                       //if temp!=1 displays that item not found
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;}
}&lt;/span&gt;
  menu&lt;span class=&quot;operator&quot;&gt;();
     
  }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
 /////////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; void&lt;/span&gt; push&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                   //take arguement
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; {&lt;/span&gt;
  
    
     stk&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;]=&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                   //places arguement at top
&lt;/span&gt;     top&lt;span class=&quot;operator&quot;&gt;++;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                        //increment top to show next available position
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;  }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
 //////////////////////////////////////////////////////////////////////////////////////// 
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;  int&lt;/span&gt; pop&lt;span class=&quot;operator&quot;&gt;()
  {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    
     int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;stk&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                               //remove element from top
&lt;/span&gt;     top&lt;span class=&quot;operator&quot;&gt;--;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                        //decrements top 
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;  return&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;;
  }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;  
 /////////////////////////////////////////////////////////////////////////////////// 
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;  int&lt;/span&gt; isfull&lt;span class=&quot;operator&quot;&gt;()
  {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt; top&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;size&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                              //check if top is equal to total size
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; ;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                  //return true i-e stack is full
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     else                                       
     return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                   //else return false tnat stack is not full
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;     }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
 /////////////////////////////////////////////////////////////////////////////////    
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;     int&lt;/span&gt; isempty&lt;span class=&quot;operator&quot;&gt;()
     {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                             //check if top is zero
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;         return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                              //return true that stack is empty
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;         else
         return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                              //else return false that stack is not empty
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;     }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; 
/////////////////////////////////////////////////////////////////////////////////////////   
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; find_by_position&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; pos&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;top&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;stack is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
     {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
     {&lt;/span&gt;    
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter position to find its content\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;size&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; 
     for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;size&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)
     {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
             if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;)
             {&lt;/span&gt;
                       cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item at position &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; is &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;stk&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;]&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;
                       
              }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   //if closed
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;     }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   //for closed
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;            
     }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;  //else closed
&lt;/span&gt;     menu&lt;span class=&quot;operator&quot;&gt;();
     }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //function closed
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
     {&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;welcome to stack application\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                //funtion call to main menu
&lt;/span&gt;         getch&lt;span class=&quot;operator&quot;&gt;();
         }&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;Program Sample output&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;create, enter size, select number of elements to enter then enter elements&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;font-weight: bold; margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYC-TB6aUMb1iCNtJrZQoC7xvboQhP3UmGwkYdH6XwAaEtoPP25BZCbSmbiKomzaaUtdVGKRaDdwrst4iBqSgn1ZgkaCtjQe4Mkaw6wjBTJ_yFDt1USBrd7RL46GdX0akE00CPmNR14Xh5/s1600/stack_implementation_cpp_using_array.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;stack c++ using array output program&quot; border=&quot;0&quot; height=&quot;242&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYC-TB6aUMb1iCNtJrZQoC7xvboQhP3UmGwkYdH6XwAaEtoPP25BZCbSmbiKomzaaUtdVGKRaDdwrst4iBqSgn1ZgkaCtjQe4Mkaw6wjBTJ_yFDt1USBrd7RL46GdX0akE00CPmNR14Xh5/s320/stack_implementation_cpp_using_array.PNG&quot; title=&quot;stack c++ program output&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Program output&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Push element to stack&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; font-weight: bold; text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcZC34TnxABbcw3DSFprQQNNhe3cb_nOhbKGVxAs6plyFbNilF5Pr2H-2EAq7b0w11yKu1jBMfLB7rOtYlkMYh5r8aqpiyhq1G1nwRqdSSnku3jOWbFhn9UTStsGY8Jq5qKO_dyIfa8rhZ/s1600/push_element_to_cpp_stack.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;229&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcZC34TnxABbcw3DSFprQQNNhe3cb_nOhbKGVxAs6plyFbNilF5Pr2H-2EAq7b0w11yKu1jBMfLB7rOtYlkMYh5r8aqpiyhq1G1nwRqdSSnku3jOWbFhn9UTStsGY8Jq5qKO_dyIfa8rhZ/s320/push_element_to_cpp_stack.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Output video&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/wXo9JFfk8Vs/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/wXo9JFfk8Vs?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;https://drive.google.com/file/d/0B8ioT96GE0MpamZzY2lPcUFFdEk/view?usp=sharing&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Download Source code from Google Drive&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;Note: &lt;/b&gt;It is recommended to dry run all the code for better understanding. There is always more way to code a program. Try to improve it by adding more functions and validations. Hope this mini c++ project help the beginners.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;See also: &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/2016/10/array-based-queue-cpp-simple-project.html&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;Queue Implementation Using Array C++ Source Code&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;More C++ projects can be found here&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://fahad-cprogramming.blogspot.com/p/cpp-projects.html&quot; target=&quot;_blank&quot;&gt;Simple C++ mini projects for beginners&lt;/a&gt;&amp;nbsp;&lt;/span&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/3734473792048939576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2016/10/stack-implementation-in-cpp-using-array.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/3734473792048939576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/3734473792048939576'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2016/10/stack-implementation-in-cpp-using-array.html' title='stack implementation in c++ using array source code'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYC-TB6aUMb1iCNtJrZQoC7xvboQhP3UmGwkYdH6XwAaEtoPP25BZCbSmbiKomzaaUtdVGKRaDdwrst4iBqSgn1ZgkaCtjQe4Mkaw6wjBTJ_yFDt1USBrd7RL46GdX0akE00CPmNR14Xh5/s72-c/stack_implementation_cpp_using_array.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-8820456616774315588</id><published>2016-10-11T17:19:00.000-07:00</published><updated>2016-10-14T16:37:38.647-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="example"/><category scheme="http://www.blogger.com/atom/ns#" term="project"/><category scheme="http://www.blogger.com/atom/ns#" term="queue"/><title type='text'>Array based Queue c++ simple project</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;In this &lt;b&gt;c++ tutorial&lt;/b&gt; we will discuss &amp;nbsp;about&amp;nbsp;&lt;b&gt;Array Based Queue C++ project &lt;/b&gt;which have 10 functions&amp;nbsp;including&amp;nbsp;main function. User will select an option from main menu function and the respective&amp;nbsp;function will be called.&amp;nbsp;&lt;b&gt;The code is for array based queue implementation&lt;/b&gt;. It comprises of various operations that can be performed on &lt;b&gt;array based queue&lt;/b&gt;. This code can be used as a project or &lt;b&gt;self-assignment by beginners of data structure&lt;/b&gt;. It is recommended to understand the code thoroughly mainly the “logic” then try to create logic for each individual function by yourself. It will surely enhance your coding capability&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;What is a Queue?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;List of items arranged on basis of first in and first out principal is called queue.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;It has 2 ends.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Data can be considered as to pass through hollow cylinder.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Data enters from one end and leaves from another end.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Data only moves in one direction.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Characteristics Of Queue:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;It works on the FIFO (first in first out) principal.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;It is ordered list and has elements/data of same type.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;It doesn’t allow duplication of data.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;Enqueue function is used to insert new item in queue.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Dequeue function is used to remove any item from queue.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&amp;nbsp;If you want to dequeue any random item from queue, you will have to first dequeuer all items above it. Then remove the item you want. Then enqueue dequeued items accordingly.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfkXGm_bIRljzfnGkKlnxhA_f_RQwvVFva_ua8GR4S6wQHn_3sTYXy3mCdKFcHfEPTENAZmwJwqjCjJ_Br2iUxd1LcPhbmJ5e0cchZku0xPAGwpLxno5rq3K44buDVeo8xUwRH7puqUOVs/s1600/array_based_queue_cpp_source_code_project.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;img alt=&quot;cpp queue source code&quot; border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfkXGm_bIRljzfnGkKlnxhA_f_RQwvVFva_ua8GR4S6wQHn_3sTYXy3mCdKFcHfEPTENAZmwJwqjCjJ_Br2iUxd1LcPhbmJ5e0cchZku0xPAGwpLxno5rq3K44buDVeo8xUwRH7puqUOVs/s400/array_based_queue_cpp_source_code_project.PNG&quot; title=&quot;c++ queue example &quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;queue image example&amp;nbsp;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Real World Examples:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;People standing in a queue for submission of their bills in bank. The person who came first will submit bill first. The person who came later will submit bill later.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Cars on one way road. The car that entered first will exists first while the car that entered later will exit later.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Array Based Queue in C++ Data Structures&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;It is a linear data structure in which insertion of data/element takes places from end (rear) and deletion of data/element takes place from front (head).It allows you to store a data in form of array.&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Project Overview&lt;/b&gt;:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Below I am going to share with you a c++ source code that is compiled using dev c++ compiler&lt;/b&gt;. The code is for array based queue implementation. It comprises of various operations that can be performed on array based queue. This code can be used as a project or self-assignment by beginners of data structure. It is recommended to understand the code thoroughly mainly the “logic” then try to create logic for each individual function by yourself. It will surely enhance your coding capability.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Code:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;pre style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;pre&quot;&gt;#include&amp;lt;iostream&amp;gt;     //header files
#include&amp;lt;conio.h&amp;gt; //header files
#include&amp;lt;stdlib.h&amp;gt;      //header files
#include&amp;lt;stdio.h&amp;gt;     //header files
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

//////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;/*declaration of global variables*/
/* front will show first index of array, initiated with -1 that shows that nothing is present at first position in queue*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; front&lt;span class=&quot;operator&quot;&gt;=-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   
/* rear will show first last index of array, initiated with -1 that shows that nothing is present at last position in queue*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; rear&lt;span class=&quot;operator&quot;&gt;=-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; index&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;          // index will represent that how long is queue
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;queue&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;index&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;      // for dynamical creation of queue
//////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;/*declaration of functions*/&lt;/span&gt;
The functions below are named in such a way that they will clearly reveal what they are meant&lt;span class=&quot;flow&quot;&gt; for&lt;/span&gt; &lt;span class=&quot;comment&quot;&gt;
//////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; createqueue&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; enqueue&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; dequeue&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; deletequeue&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; clearqueue&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; isfull&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; find&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; display&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

/////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;The function below is the first function that would be called when code is executed&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt; It will display a menu having different functionalities&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt; Just select the number corresponding to operation you want to perform&lt;span class=&quot;operator&quot;&gt; and&lt;/span&gt; then you will be on your way to go &lt;span class=&quot;comment&quot;&gt;
////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; menu&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt; 
     system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;     /*built in function supported by dev c++ to pause a screen until “enter” or any key is entered to proceed further.*/&lt;/span&gt;
     system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   /*It will remove any garbage value that may appear on screen*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; option&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;****welcome to queue application****\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 1 to create queue\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 2 to display queue\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 3 to delete queue\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 4 to clear queue\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 5 to find number in queue\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 6 to enqueue\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 7 to dequeue\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 8 to check if queue is full\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 9 to check if queue is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 0 to exit\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter option\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;option&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
//////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;Below I have used a&lt;span class=&quot;flow&quot;&gt; switch&lt;/span&gt; to call various functions&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt; If you are a beginner&lt;span class=&quot;operator&quot;&gt; and&lt;/span&gt; don’t have any idea about “&lt;span class=&quot;flow&quot;&gt;switch&lt;/span&gt;” you can go ahead with&lt;span class=&quot;flow&quot;&gt; if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;else&lt;/span&gt; statements but their drawback is they mess up everything&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; make confusions as code gets lengthy&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; 
/////////////////////////////////////////////////////////////////////////////////////     
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     switch&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;option&lt;span class=&quot;operator&quot;&gt;)
     {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   // this case will simply call create queue function and will create it.
&lt;/span&gt;          createqueue&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
          menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   // this case will call display function and will display queue items
&lt;/span&gt;          display&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
          menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;  // this function will delete whole queue by calling delete queue function
&lt;/span&gt;          deletequeue&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
          menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;     // it will only clear items in queue but empty queue will still exist
&lt;/span&gt;          clearqueue&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
          menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   // it will search for required item in queue
&lt;/span&gt;          find&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
          menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;    //
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;          {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
          int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*the check below will be used throughout the code to check if queue is created or not. Note the point that whenever front and rear will have negative value it means that array does not exist because array’s index can never be negative*/&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          else  
          if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;isfull&lt;span class=&quot;operator&quot;&gt;()==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
          
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue is already full\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
                     
          else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
          {&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter element to enqueue\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
          cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
          enqueue&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;);
          }&lt;/span&gt;
          menu&lt;span class=&quot;operator&quot;&gt;();
          }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 7&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
          {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          else 
          if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;isempty&lt;span class=&quot;operator&quot;&gt;()==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
          {&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue is already empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
          }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
          {&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;element dequeued is :&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;dequeue&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;                
          }&lt;/span&gt;
          menu&lt;span class=&quot;operator&quot;&gt;();
          }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; 
          break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
          {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;     
          int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     
          if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          else&lt;/span&gt;   
          isfull&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue is full\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          else&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue is not full\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
          }&lt;/span&gt;
          menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
          {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
          int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     
          if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          else&lt;/span&gt;   
          isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
          {&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue is not empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;   
          }&lt;/span&gt;
          menu&lt;span class=&quot;operator&quot;&gt;();
          }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          
     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
          exit&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   
    default&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;invalid input\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
          }
          }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
//////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;          
void&lt;/span&gt; createqueue&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*The loop below will continue till you enter correct size of queue that must be greater than zero*/&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
     {&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter size of queue:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;index&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;index&lt;span class=&quot;operator&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
//////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;Suppose you entered&lt;span class=&quot;int&quot;&gt; 10&lt;/span&gt; then&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt; queue will be like that
Front&lt;span class=&quot;operator&quot;&gt;/&lt;/span&gt;rear&lt;span class=&quot;int&quot;&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixWC_d5CGaiyEOUbSMBL5Yuu_LMGhmVhIcFpUrGOmj-nx-32tnZuYsR6GkqXJP15hFK64kt09O1vTDAoYZSEzlAHQIXts2v9bqTCvJu5aEVwr3omarEB1FHRW3SAa9K1YdmosSKputydFC/s1600/queue_cpp_front.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;queue input value &quot; border=&quot;0&quot; height=&quot;93&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixWC_d5CGaiyEOUbSMBL5Yuu_LMGhmVhIcFpUrGOmj-nx-32tnZuYsR6GkqXJP15hFK64kt09O1vTDAoYZSEzlAHQIXts2v9bqTCvJu5aEVwr3omarEB1FHRW3SAa9K1YdmosSKputydFC/s400/queue_cpp_front.PNG&quot; title=&quot;enter input value 10 in queue&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;enter queue value = 10&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/span&gt;Dequeue&lt;span class=&quot;operator&quot;&gt;/&lt;/span&gt; Enqueue&lt;span class=&quot;comment&quot;&gt;         
//////////////////////////////////////////////////////////////////////////////////////  
&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*The loop below will continue till you enter accurate current size that must be positive and less then index value. The “rear” here is pointing last index. */&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
     {&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter current size of queue:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;index&lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;Suppose you entered rear&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;5&lt;/span&gt; so&lt;span class=&quot;operator&quot;&gt;,&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdnoj5_D7h5oP_2oSlG1yttQHKWWZfC9GsN18cr5o5eL09_h585YMFeMypOcGWF62BB5LnNsiEHq-SgbvIxCuu5XD7x_kMSi-vTNfD3cqyTFfcvilH-jkkm6MrveR3yhQ6ImtDEwW-MqkA/s1600/queue_cpp_code_enqueue_dequeue.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;c++ enter input &quot; border=&quot;0&quot; height=&quot;120&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdnoj5_D7h5oP_2oSlG1yttQHKWWZfC9GsN18cr5o5eL09_h585YMFeMypOcGWF62BB5LnNsiEHq-SgbvIxCuu5XD7x_kMSi-vTNfD3cqyTFfcvilH-jkkm6MrveR3yhQ6ImtDEwW-MqkA/s400/queue_cpp_code_enqueue_dequeue.PNG&quot; title=&quot;queue input is &quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;queue input = 5&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/span&gt;
&lt;span class=&quot;int&quot;&gt;         
&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
//////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;     front&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   // front always start from zero it could be 1 also. 
&lt;/span&gt;     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter elements\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    
     for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;// loop will start from ‘0’ and continue till “rear” value
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;     {&lt;/span&gt;
        cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;queue&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;];
     }&lt;/span&gt;
 cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue is successfully created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRyBeLS2ZzRGRhedPtWzHUs89hHuEISTTnF70mJd_9uRkHeCXp4wTY-AmnQ9tC_0EvEBZIytTYiUFxAQ8WH8T-cV2eHZxlNxgsmhEnC1jxI3N7V2OVnfS40uALNv5yIM-fuU70THESe8ru/s1600/cpp_queue_dsa.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;c++ queue created function&quot; border=&quot;0&quot; height=&quot;116&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRyBeLS2ZzRGRhedPtWzHUs89hHuEISTTnF70mJd_9uRkHeCXp4wTY-AmnQ9tC_0EvEBZIytTYiUFxAQ8WH8T-cV2eHZxlNxgsmhEnC1jxI3N7V2OVnfS40uALNv5yIM-fuU70THESe8ru/s400/cpp_queue_dsa.PNG&quot; title=&quot;cpp queue created&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;queue created c++&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
//////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;The function below will be used&lt;span class=&quot;flow&quot;&gt; for&lt;/span&gt; display&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; 
//////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; display&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;)
     {&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;total number of elements in queue are:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;-&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                             // rear=5 , front=0 so 5-0=5 elements
&lt;/span&gt;     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;elements are\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)&lt;/span&gt;                        
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;queue&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;]&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
     {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; length&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     length&lt;span class=&quot;operator&quot;&gt;=(&lt;/span&gt;index&lt;span class=&quot;operator&quot;&gt;-&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;)+&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;total number of elements in queue are:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;length&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;elements are\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;index&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; j&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;j&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;j&lt;span class=&quot;operator&quot;&gt;++)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;queue&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;]&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;; 
     }    
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

//////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; deletequeue&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else&lt;/span&gt;
     front&lt;span class=&quot;operator&quot;&gt;=-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     rear&lt;span class=&quot;operator&quot;&gt;=-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue is successfully deleted\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; 

/////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; clearqueue&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else&lt;/span&gt;
     front&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     rear&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue is successfully cleared\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; find&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; temp&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; number&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;queue not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;  
     else&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter number to find in queue\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;number&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)
     {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;queue&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;]==&lt;/span&gt;number&lt;span class=&quot;operator&quot;&gt;)
     {&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;number found at position&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     temp&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
     
     }
     }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;temp&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;number not found\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
     
     }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

//////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
void&lt;/span&gt; enqueue&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;)
{&lt;/span&gt;
     queue&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;]=&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     rear&lt;span class=&quot;operator&quot;&gt;=(&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)%&lt;/span&gt;index&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;element is successfully enqueued\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

//////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; dequeue&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;queue&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;
    front&lt;span class=&quot;operator&quot;&gt;=(&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)%&lt;/span&gt;index&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    return&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;

////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; isfull&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;-&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    else 
    return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
///////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; isempty&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;front&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;rear&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    else
    return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
}&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;         



///////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
    menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
    return 0;&lt;span class=&quot;operator&quot;&gt;
}
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;text-align: left;&quot;&gt;&lt;pre style=&quot;text-align: left;&quot;&gt;C++ source code output:&lt;/pre&gt;
&lt;/pre&gt;
&lt;pre style=&quot;text-align: left;&quot;&gt;&lt;/pre&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/QgDUY49cIFE/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;https://www.youtube.com/embed/QgDUY49cIFE?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;span style=&quot;text-align: left;&quot;&gt;Sample input output&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;text-align: left;&quot;&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr-F2mP3iDTlMOAWxq8v9RUYOQGc-aWnM2Rnrghei1ddbNf-CBlZuTWgxiGIj-qe7qRjzfK7mAEQ5laRct28cG7ZWFH8IOynT5hNOl3ltlRqh3DKYiA3zZlfCR3cTzp74co9g0DBdb8cOv/s1600/queue_cpp_front_input_1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;queue project menu &quot; border=&quot;0&quot; height=&quot;158&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr-F2mP3iDTlMOAWxq8v9RUYOQGc-aWnM2Rnrghei1ddbNf-CBlZuTWgxiGIj-qe7qRjzfK7mAEQ5laRct28cG7ZWFH8IOynT5hNOl3ltlRqh3DKYiA3zZlfCR3cTzp74co9g0DBdb8cOv/s320/queue_cpp_front_input_1.PNG&quot; title=&quot;program menu &quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;menu output selection&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/pre&gt;
&lt;pre style=&quot;text-align: left;&quot;&gt;if we select option 1 and enter 1, 2, 3 then option 2 we have&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjW4jTv5INmeKgMEkCuhYhQVln5MkG7ul_Pwco8J5GKKLmB7R2fUMjsAibtKLj_pnJ3slf14ooSHcVg9G_eha-9MsxrpLpE021jWozDugzM8y5mQyMPzh5nswDsLF99flknQFxcXRgMeLn/s1600/display_queue.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;queue display c++ project&quot; border=&quot;0&quot; height=&quot;232&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjW4jTv5INmeKgMEkCuhYhQVln5MkG7ul_Pwco8J5GKKLmB7R2fUMjsAibtKLj_pnJ3slf14ooSHcVg9G_eha-9MsxrpLpE021jWozDugzM8y5mQyMPzh5nswDsLF99flknQFxcXRgMeLn/s320/display_queue.PNG&quot; title=&quot;display queue&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;display queue c++ project&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;find more projects here: &lt;a href=&quot;http://fahad-cprogramming.blogspot.com/p/cpp-projects.html&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;C++ projects source code&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;text-align: left;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/8820456616774315588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2016/10/array-based-queue-cpp-simple-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/8820456616774315588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/8820456616774315588'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2016/10/array-based-queue-cpp-simple-project.html' title='Array based Queue c++ simple project'/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfkXGm_bIRljzfnGkKlnxhA_f_RQwvVFva_ua8GR4S6wQHn_3sTYXy3mCdKFcHfEPTENAZmwJwqjCjJ_Br2iUxd1LcPhbmJ5e0cchZku0xPAGwpLxno5rq3K44buDVeo8xUwRH7puqUOVs/s72-c/array_based_queue_cpp_source_code_project.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7946301980552876196.post-6364635729457641587</id><published>2016-09-28T13:57:00.000-07:00</published><updated>2016-09-28T13:57:52.025-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="array"/><category scheme="http://www.blogger.com/atom/ns#" term="C++"/><category scheme="http://www.blogger.com/atom/ns#" term="project"/><title type='text'>Array based list c++ simple project </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;Array based list Implementation&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;What is Array based list?&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;It is a data structure that is used to store data in a single array.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;Also known as backing array.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Advantages:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;They allow you to randomly access any item in list by providing constant time access to any value in array.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Disadvantages&lt;/b&gt;:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;They cannot expand or shrink.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;They are not very dynamic. It means if you want to add or remove data in somewhere middle of the list you will need to shift all elements in the array either to fill the gap caused by removal of item or to make a space for inserting an item.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;If number of elements exceed the size of backing array then an expensive operations needs to be performed. The operation is to make a new array of size larger than previous array and shift all the elements of previous array in new array accordingly before making new insertions.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;C++ project introduction&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;this project contains following list of functions. Every function is called by a menu option.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;Create list&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;Delete list&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;Clear list&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;Display list&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;add item in list&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;add item at particular place&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;remove item from list&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;remove item from particular position&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;swap items by position&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;find item in list&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;find item by position&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;copy list&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;update item&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;update item by position&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;check size of list&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;get element&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;check if list is full&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;check if list is empty&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;C++&amp;nbsp;Project Overview:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;This code below can be used by beginners as a small project or assignment during semester. It contains menu based working using 19 functions. You can add more functions in it and can extend it to any level using your own customization.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span class=&quot;comment&quot;&gt;/*inclusion of header files*/&lt;/span&gt;&lt;span class=&quot;pre&quot;&gt;
#include&amp;lt;iostream&amp;gt;
#include&amp;lt;conio.h&amp;gt;
#include&amp;lt;stdlib.h&amp;gt;
#include&amp;lt;stdio.h&amp;gt;
&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;using namespace&lt;/span&gt; std&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;/*initialization of global variables and dynamic array */
/*By global variable we mean the variables that can be used anywhere in whole code*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
int&lt;/span&gt; total_size&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                    // shows total size of list is zero
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; *&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;total_size&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;              // dynamically creating array with size ‘0’
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; cs&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                                 //shows that current size of list is zero
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; cl&lt;span class=&quot;operator&quot;&gt;=-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                                                //shows that list is not created yet,  “cl=clear”

///////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;/*declaration of functions */
/*Below Is the list of functions that we will be using in our code*/
/*00*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*01*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; create_list&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*02*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; delete_list&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*03*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; clear_list&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*04*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; display_list&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*05*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; add_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*06*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; add_item_by_position&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*07*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; remove_item&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*08*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; remove_item_by_position&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;       
/*09*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; swapp_items&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*10*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; swapp_items_by_position&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*11*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*12*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; find_item_by_pos&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*13*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; copy_list&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*14*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; update_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*15*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; update_item_by_position&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*16*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; check_size_of_list&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*17*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; get_element_by_position&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*18*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; isfull&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*19*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; isempty&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
//////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;The function that is written below will work throughout the code to display a menu of various functions&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt; You will be prompted to enter the corresponding number of function you want to use&lt;span class=&quot;operator&quot;&gt; and&lt;/span&gt; move ahead&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
//////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; menu&lt;span class=&quot;operator&quot;&gt;()
{&lt;/span&gt;
   system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;pause&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
   system&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;cls&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt; 
   int&lt;/span&gt; option&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;****welcome to list application****\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 0  to exit\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;           //
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 1  to create list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;    //
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 2  to delete list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   //
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 3  to clear list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   //
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 4  to display list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;  //
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 5  to add item in list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 6  to add item at particular position\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 7  to remove item from list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 8  to remove item from particular position\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 9  to swap items\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;//
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 10 to swap items by position\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;//
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 11 to find item in list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   //
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 12 to find item by position\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   //
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 13 to copy list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;//
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 14 to update item\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 15 to update item by position\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 16 to check size of list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;press 17 to get element\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter 18 to check if list is full\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter 19 to check if list is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; //
&lt;/span&gt;   cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter option:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;option&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
///////////////////////////////////////////////////  
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;   switch&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;option&lt;span class=&quot;operator&quot;&gt;)
   {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
    {&lt;/span&gt;
    exit&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                               //built in function to exit from program    
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
//////////////////////////////////////////////////   
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;               
    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:      
         {&lt;/span&gt;          
         create_list&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();
         }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;
         delete_list&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();                                       
         }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 3&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;
         clear_list&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();                                      
         }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
////////////////////////////////////////////////                                                             
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 4&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;
         display_list&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();
         }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
///////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 5&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
         int&lt;/span&gt; it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;                                     
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;isfull&lt;span class=&quot;operator&quot;&gt;()==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is already full\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
         do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
          {&lt;/span&gt;
           cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter item:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
           cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
           if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;)==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
           cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item is already in list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
           }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
                     while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;)==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
           
           add_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;  
           cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item added successfully in list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;    
           cs&lt;span class=&quot;operator&quot;&gt;++;                        
         }&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
//////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 6&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
         int&lt;/span&gt; it&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
          do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
          {&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter item:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
          cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;)==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item is already in list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
          }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;)==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter position:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
         cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;)
         {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;--)
         {&lt;/span&gt;
                 list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;]=&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;];
         }&lt;/span&gt;
         add_item_by_position&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
         
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item added successfully at pos :&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
         cs&lt;span class=&quot;operator&quot;&gt;++;
         }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
        
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;gt;=&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt; total_size&lt;span class=&quot;operator&quot;&gt;)
        
         {&lt;/span&gt;
         list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;]=&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
         cs&lt;span class=&quot;operator&quot;&gt;++;
         }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;position out of range\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
         }&lt;/span&gt;
           menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
           break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;      
/////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 7&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else&lt;/span&gt;
         remove_item&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item is successfully removed\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;                                   
         }&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 8&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else&lt;/span&gt;                                 
         remove_item_by_position&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item successfully deleted\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;                                 
         }&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 9&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
         int&lt;/span&gt; it1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;it2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;                                  
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
         do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
         {&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter item 1: &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
         cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;it1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it1&lt;span class=&quot;operator&quot;&gt;)!=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item is not in list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
         }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it1&lt;span class=&quot;operator&quot;&gt;)!=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
         {&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter item 2: &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
         cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;it2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it1&lt;span class=&quot;operator&quot;&gt;)!=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item is not in list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
         }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it2&lt;span class=&quot;operator&quot;&gt;)!=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
         swapp_items&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;it2&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;items successfully swapped\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
                                           
         }&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
///////////////////////////////////////////                                                
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 10&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
          int&lt;/span&gt; pos1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;pos2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;                                  
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
         do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
         {&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter position 1:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
         cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;pos1&lt;span class=&quot;operator&quot;&gt;;
         }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;pos1&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt;pos1&lt;span class=&quot;operator&quot;&gt;&amp;gt;=&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
         {&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter position 2:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
         cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;pos2&lt;span class=&quot;operator&quot;&gt;;
         }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;pos2&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt;pos2&lt;span class=&quot;operator&quot;&gt;&amp;gt;=&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
        
         swapp_items_by_position&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;pos1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;pos2&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;items successfully swapped\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
         }&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;     case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 11&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;    
         int&lt;/span&gt; it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
         {&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter item to check its presence in list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
         cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
         find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;)==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
         {&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item is present in list&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
         int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;]!=&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;)
         {&lt;/span&gt;
         i&lt;span class=&quot;operator&quot;&gt;++;
         }&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;at position &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;                 
         }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item not found\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
         }&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();
         }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
//////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;         case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 12&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
         int&lt;/span&gt; pos&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
         {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
         {&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter position to find its item\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
         cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;;  
         }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;ts&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
         find_item_by_pos&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;);
         }&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();    
         }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
//////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;         case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 13&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else&lt;/span&gt;  
         copy_list&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list copied successfully\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
         }&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;         case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 14&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
          int&lt;/span&gt; it1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;it2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;   
          if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          else
          if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
          {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
          {&lt;/span&gt;       
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter item to be updated\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
          cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;it1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it1&lt;span class=&quot;operator&quot;&gt;)!=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item is not in list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
          }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it1&lt;span class=&quot;operator&quot;&gt;)!=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
          {&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter new item to be replaced\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
          cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;it2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it2&lt;span class=&quot;operator&quot;&gt;)==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item is already in list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
          }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it2&lt;span class=&quot;operator&quot;&gt;)==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
          update_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;it2&lt;span class=&quot;operator&quot;&gt;);
         }
         }&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;         case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 15&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
          int&lt;/span&gt; it&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;   
          if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          else
          if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
          cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
          else&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
          {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
           do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
           {&lt;/span&gt;   
           cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter item:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
           cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
           if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;)==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
           cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item already present\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
           }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
           while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;)==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
           cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter position:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
           cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
           if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
           update_item_by_position&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
           else&lt;/span&gt;
           cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item at &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; is not available to be updated\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
          }
             
              
         }&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
///////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;         case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 16&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else&lt;/span&gt;    
         check_size_of_list&lt;span class=&quot;operator&quot;&gt;();
        
         }&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
//////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;         case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 17&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;   
              int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
              cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              else
              if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
              cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              else
              do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
              {&lt;/span&gt;
              cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter position to get from list:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
              cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;;
              }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
              while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
              a&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;get_element_by_position&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;
              cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;here is your item from list :&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;a&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;
         }&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
//////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;         case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 18&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;isfull&lt;span class=&quot;operator&quot;&gt;()==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is full\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not full\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
         }&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;         case&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 19&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:
         {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else
         if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;isempty&lt;span class=&quot;operator&quot;&gt;()==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         else&lt;/span&gt;
         cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
         }&lt;/span&gt;
         menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;                 
/////////////////////////////////////////                                                                  
&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    default&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;invalid option\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    break&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
//////////////////////////////////////////   
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;    }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   //switch closed
&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;    }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;   //funtion closed

/////////////////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;/*definitions of functions*/&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
/*&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;The function
below will be used to create a list. In this function you will have to
dynamically create a list first. As initially the total size of list was set to
zero so that user can create a list of the size of its own choice and
requirement. Total size could be any but make sure that it should be greater
than current size of list. After entering total size enter current size of list
that should be exactly the number of items you want to insert in list.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #538135; font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;Suppose we set total_size to 10.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #538135; font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;And current size (cs) to 5.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;To avoid any
errors we have put a check while getting value from user. You’ll be prompted to
enter current size again and again if it is less than 1 or exceeds total size
of list. After checking your list will be dynamically created.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;After
creation of list you will be prompted to insert items in a list. To avoid
duplication, we have put a check on each entry. Whenever you will insert item
in list, [find_item()] function will run and compare all previously inserted
items of list with newly inserted item. If it is different, it will be entered
otherwise it will prompt again and again to enter new value/item.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;background: #D0CECE; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;40&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Cs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Ts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: 14pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span class=&quot;comment&quot;&gt;////////////////////////////////////////////////////////////////////////////////////*/
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;    void&lt;/span&gt; create_list&lt;span class=&quot;operator&quot;&gt;()
     {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter total size of list:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;total_size&lt;span class=&quot;operator&quot;&gt; ;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
     {&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter current size of list:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;&amp;gt;=&lt;/span&gt;ts&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    
     int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;)
     {&lt;/span&gt;
       
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter item:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
       
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;)!=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
     {&lt;/span&gt;
    
     list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;]=&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     i&lt;span class=&quot;operator&quot;&gt;++;
     }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item already present\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;       //while closed
&lt;/span&gt;     cl&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;       //function closed
&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14pt; line-height: 107%;&quot;&gt;The function
below can be considered as a heart of the code as it will work for insertion of
any new entry in list to check for duplication. It will return 1 that means
true if new entry of item matches already existing item in list. Otherwise it
will return 0 that means false.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;Working:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;We will pass
any item that we want to check for duplication to this function. It will start
checking from them item present at first number of list till end of list. Each
time it will compare the item passed to it with item at particular position. It
will continue till it reaches end of list or find a duplicate item. If there is
no duplicate item and function has reached end of list, it will return 0. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14pt; line-height: 107%;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; it&lt;span class=&quot;operator&quot;&gt;)
     {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;  
     for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt; total_size&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
         
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;]==&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;       
The function below will randomly access any item whose position you will pass to it&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt; and&lt;/span&gt; then it will&lt;span class=&quot;flow&quot;&gt; return&lt;/span&gt; you that item&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
     int&lt;/span&gt; find_item_by_pos&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; pos&lt;span class=&quot;operator&quot;&gt;)
    
     {&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item at position &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot; is &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;]&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt; 
     return&lt;/span&gt;&lt;span class=&quot;int&quot;&gt; 1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #538135; font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;/*Suppose you pass pos = 3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: #538135; font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;This function will return you 30.
According to list.*/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14pt; line-height: 107%;&quot;&gt;The function
below will be used to display status of list whenever needed. But before
displaying it will check if list is empty? Or if list is not created yet. If
any of the two options come true, it will display the message accordingly.
Otherwise it will simply display a list.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span class=&quot;type&quot;&gt;
     void&lt;/span&gt; display_list&lt;span class=&quot;operator&quot;&gt;()
     {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else    
     for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;]&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*Output: After the listed you have created first by inserting 5 items, if you will run this function the output you will have will be like:
10
20
30
40
50
*/
/*////////////////////////////////////////////////////////////////////////////////////
The function below will simply delete the list by giving negative value to “cl”. Must note that array can never have negative value, but if you assign it this value it means that it doesn’t exist.
///////////////////////////////////////////////////////////////////////////////////*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

     void&lt;/span&gt; delete_list&lt;span class=&quot;operator&quot;&gt;()
     {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else&lt;/span&gt;
     cl&lt;span class=&quot;operator&quot;&gt;=-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is successfully deleted\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
////////////////////////////////////////////////////////////////////////////////////
&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;/*////////////////////////////////////////////////////////////////////////////////////
The function below will clear the list i-e only remove items from the list. By doing this, list will come to its initial form. It will exist but will be empty. We have put check before clearing the list to check if list exists or not and if it exists is it already clear or not. The function will work if list exists and contains some values otherwise it will show a default message that you already set.
///////////////////////////////////////////////////////////////////////////////////*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

     void&lt;/span&gt; clear_list&lt;span class=&quot;operator&quot;&gt;()
     {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cl&lt;span class=&quot;operator&quot;&gt;==-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is not created\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;    
     else
     if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is already empty\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
     else&lt;/span&gt;
     cs&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
     cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;list is successfully cleared\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;    
     }&lt;/span&gt;

The function below will add item at unallocated location right after last item in list&lt;span class=&quot;operator&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;

     void&lt;/span&gt; add_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; item&lt;span class=&quot;operator&quot;&gt;)
     {&lt;/span&gt;
      list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;]=&lt;/span&gt;item&lt;span class=&quot;operator&quot;&gt;;
     }&lt;/span&gt; 
&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: 14pt; line-height: 107%;&quot;&gt;It will add
item to specific location in list. For eg you want to insert item at 7&lt;/span&gt;&lt;sup style=&quot;line-height: 107%;&quot;&gt;th&lt;/sup&gt;&lt;span style=&quot;font-size: 14pt; line-height: 107%;&quot;&gt;
location then,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;background: #D0CECE; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;40&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;70&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Cs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Ts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void add_item_by_position(int item,int
pos)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; list[pos]=item;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;This
function will return 1 if current size is equal to total size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; indicating list if full and there is no
more space to add more item &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;background: #D0CECE; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;40&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;60&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;70&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;90&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;100&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Cs/Ts &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int isfull()&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(cs== total_size)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;This
function will return 0 if current size is zero that indicates list is empty&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;background: #D0CECE; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;Cs=0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Ts&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int isempty()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(cs==0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;The function
below will be used to update and item in a list . Suppose you want to update
item 40 to 80 then use this function.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;Before
update:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;background: #D0CECE; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #BDD6EE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;40&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Cs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Ts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;After
update:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;background: #D0CECE; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #BDD6EE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Cs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Ts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span class=&quot;type&quot;&gt;    void&lt;/span&gt; update_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; it1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; it2&lt;span class=&quot;operator&quot;&gt;)
    {&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   
    if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it1&lt;span class=&quot;operator&quot;&gt;)==&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)
    {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;                    
    for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;]!=&lt;/span&gt;it1&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;
    list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;]=&lt;/span&gt;it2&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;at&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;=&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;]&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item successfully updated\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    else&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;it1&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;is not in list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;    
    }&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14pt; line-height: 107%;&quot;&gt;The function
below will be used to update and item in a list by defining position at which
place you want to update an item. Suppose you want to update item 40 to 80 and
40 is at position ‘4’ then use this function, pass the position at new item to
the function. The function will replace the existing value with new value at
position passed as argument.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;Before
update:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;background: #D0CECE; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #BDD6EE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;40&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Cs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Ts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;After
update:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;background: #D0CECE; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #BDD6EE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;80&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Cs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Ts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;////////////////////////////////////////////////////////////////////////////////////*/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void update_item_by_position(int it,int
pos)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int&amp;nbsp;
a=list[pos];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; list[pos]=it;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&quot;item at position
&quot;&amp;lt;&amp;lt;pos&amp;lt;&amp;lt;&quot; is successfully updated\n&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&quot;old item
was:&quot;&amp;lt;&amp;lt;a&amp;lt;&amp;lt;endl;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&quot;new item is
:&quot;&amp;lt;&amp;lt;it&amp;lt;&amp;lt;endl;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: 14pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: 14pt; line-height: 107%;&quot;&gt;Current size
basically shows that how many items are in a list, so in order to get size of
list the function below will be used that will print value of ‘Current size
(cs)’.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: 14pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: 14pt; line-height: 107%;&quot;&gt;&amp;nbsp; &amp;nbsp; void check_size_of_list()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&quot;current size of list
is:&quot;&amp;lt;&amp;lt;cs&amp;lt;&amp;lt;endl;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14pt; line-height: 107%;&quot;&gt;The function
below can be used to directly get the item present at particular position.
Suppose in list below you want to get item present t position 4, so just pass number
‘4’ as argument and function will return ’40’.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;background: #D0CECE; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #BDD6EE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: accent1; mso-background-themetint: 102; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;40&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Cs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Ts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;/////////////////////////////////////////////////////////////////////////////*/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp; int get_element_by_position(int pos)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp; return list[pos];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;/*///////////////////////////////////////////////////////////////////////////////////&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;The function
below can be used to swap any two items in a list. You have to pass the items
that you want to swap. The function will first find both values in a list and
then swap them. Suppose you want to swap 20 and 40 in list so.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;Before
swapping:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;background: #D0CECE; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #9CC2E5; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: accent1; mso-background-themetint: 153; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #9CC2E5; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: accent1; mso-background-themetint: 153; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;40&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Cs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Ts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;After
swapping:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;background: #D0CECE; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #9CC2E5; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: accent1; mso-background-themetint: 153; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;40&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #9CC2E5; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: accent1; mso-background-themetint: 153; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Cs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Ts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: 14pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span class=&quot;type&quot;&gt;   void&lt;/span&gt; swapp_items&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; it1&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; it2&lt;span class=&quot;operator&quot;&gt;)
   {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; j&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;,&lt;/span&gt;k&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
   
    do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
    {&lt;/span&gt;
    j&lt;span class=&quot;operator&quot;&gt;++;
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;j&lt;span class=&quot;operator&quot;&gt;]!=&lt;/span&gt;it1&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  
    do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
    {&lt;/span&gt;
    k&lt;span class=&quot;operator&quot;&gt;++;
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;k&lt;span class=&quot;operator&quot;&gt;]!=&lt;/span&gt;it2&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
   int&lt;/span&gt; temp&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
   temp&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;j&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;
   list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;j&lt;span class=&quot;operator&quot;&gt;]=&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;k&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;
   list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;k&lt;span class=&quot;operator&quot;&gt;]=&lt;/span&gt;temp&lt;span class=&quot;operator&quot;&gt;;
   }&lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: 14pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: 14pt; line-height: 107%;&quot;&gt;The function
below can be used to swap any two items in a list. You have to pass the
positions of items that you want to swap. This thing will give you instant
result and function will not have to find the values first. It will directly go
to the positions and then swap items. Suppose you want to swap items at
position 2 and 4&amp;nbsp; in list so.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;Before
swapping:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;background: #D0CECE; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #9CC2E5; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: accent1; mso-background-themetint: 153; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #9CC2E5; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: accent1; mso-background-themetint: 153; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;40&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Cs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Ts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;After
swapping:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;background: #D0CECE; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #9CC2E5; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: accent1; mso-background-themetint: 153; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;40&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #9CC2E5; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: accent1; mso-background-themetint: 153; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #D0CECE; border-left: none; border: solid windowtext 1.0pt; mso-background-themecolor: background2; mso-background-themeshade: 230; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt;&quot;&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 46.75pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Cs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Ts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;////////////////////////////////////////////////////////////////////////////////////*/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp; void swapp_items_by_position(int pos1,int
pos2)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int temp=0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp=list[pos1];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; list[pos1]=list[pos2];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; list[pos2]=temp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;/*/////////////////////////////////////////////////////////////////////////////////
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;The function
below can be used to copy list items from one list to another.&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;////////////////////////////////////////////////////////////////////////////////*/&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp; void copy_list()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int i,j;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int *c_list=new int[cs];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(i=0;i&amp;lt;cs;i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c_list[i]=list[i];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;&quot;your copied list
is\n&quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(j=0;j&amp;lt;cs;j++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; cout&amp;lt;&amp;lt;c_list[j]&amp;lt;&amp;lt;endl;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;/*////////////////////////////////////////////////////////////////////////////////&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;The function
below can be used to remove an item from list. You have to pass the item you want
to delete. The function will first find item in list then delete it.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size: 14.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span class=&quot;type&quot;&gt;void&lt;/span&gt; remove_item&lt;span class=&quot;operator&quot;&gt;()
 {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
  int&lt;/span&gt; it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;   
  do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
  {&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter item to delete from list:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;   
  if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;)!=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
  cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;item is not in list\n&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;find_item&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;)!=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
   int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;  
  do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
  {&lt;/span&gt;
  i&lt;span class=&quot;operator&quot;&gt;++;    
  }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;]!=&lt;/span&gt;it&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
  int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
  a&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
  for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; j&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;j&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;j&lt;span class=&quot;operator&quot;&gt;++)
  {&lt;/span&gt;
  list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;j&lt;span class=&quot;operator&quot;&gt;]=&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;j&lt;span class=&quot;operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;];
  }&lt;/span&gt;
  cs&lt;span class=&quot;operator&quot;&gt;--;
  }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*/////////////////////////////////////////////////////////////////////////////
The function below can be used to remove an item from list. You have to pass the position from which you want to delete item. The function will go to that position in list then delete it.
//////////////////////////////////////////////////////////////////////////////*/&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
   void&lt;/span&gt; remove_item_by_position&lt;span class=&quot;operator&quot;&gt;()
   {&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;
    int&lt;/span&gt; pos&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    do&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;
    {&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;enter position:&quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    cin&lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    if&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;)&lt;/span&gt;
    cout&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&quot;there is no item at position &quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;endl&lt;span class=&quot;operator&quot;&gt;;   
    }&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    while&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;   
    int&lt;/span&gt; a&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;
    a&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;flow&quot;&gt;
    for&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt; i&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;pos&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;cs&lt;span class=&quot;operator&quot;&gt;;&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;++)
    {&lt;/span&gt;
     list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;]=&lt;/span&gt;list&lt;span class=&quot;operator&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;int&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;];
    }&lt;/span&gt;
    cs&lt;span class=&quot;operator&quot;&gt;--;
   }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt; 
////////////////////////////////////////////////////////////////////////////////    
&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;/* start of main*/&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
////////////////////////////////////////////////////////////////////////////////////         
&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;    int&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;()
    {&lt;/span&gt;
        menu&lt;span class=&quot;operator&quot;&gt;();&lt;/span&gt;
        getch&lt;span class=&quot;operator&quot;&gt;();
    }&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;
/*end of main */&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: 14.0pt; line-height: 107%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;https://drive.google.com/file/d/0B8ioT96GE0MpSmVHVGl3XzdoRTA/view?usp=sharing&quot; target=&quot;_blank&quot;&gt;Download c++ source code&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Sample input outputs&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOz47G8lG8K_cjzRp8PhzHNWsbTgcXNkLO6sKFwLCVRHCpTtMRkLRq-ugmZBiDop4XCfFr9-7NHqYEhXO91kqf1QOITY_H5mKpniTPjonpj27-yZ6peMAin82E57dta662c67rEzWvwm-1/s1600/array+cpp+project+example_1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;array based list c++ project example&quot; border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOz47G8lG8K_cjzRp8PhzHNWsbTgcXNkLO6sKFwLCVRHCpTtMRkLRq-ugmZBiDop4XCfFr9-7NHqYEhXO91kqf1QOITY_H5mKpniTPjonpj27-yZ6peMAin82E57dta662c67rEzWvwm-1/s320/array+cpp+project+example_1.png&quot; title=&quot;array based list c++ project example&quot; width=&quot;283&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Select option create list&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip1eLSrmqf9s6y14VNe9c56hNg3HGzqSPrQ5e4iNEcmCETl1AM9Nb4CGWsUsDJp__L5t27mlqV9whu63k-kIRyoV9JgW_EeCrBW4qMYXI4a-sERJwLqLOzTVSCWBnd7hDu5hewLF4rLr_J/s1600/array_cpp_output_example_code_2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEip1eLSrmqf9s6y14VNe9c56hNg3HGzqSPrQ5e4iNEcmCETl1AM9Nb4CGWsUsDJp__L5t27mlqV9whu63k-kIRyoV9JgW_EeCrBW4qMYXI4a-sERJwLqLOzTVSCWBnd7hDu5hewLF4rLr_J/s320/array_cpp_output_example_code_2.png&quot; width=&quot;250&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqmnWI5QD3cERQjp4lHgoFozDjq5Qv9rq-9r3trtnwQMffF7zsdEXrtZlmriBqEzF2eceDhkcRL4LTTpY-NI1M_XI1BoBYoMd-xtWaEOcEmxqT90Uv8UbfqGPpUp3Ozy57jrnq2XyFdZPN/s1600/array_example_code_4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqmnWI5QD3cERQjp4lHgoFozDjq5Qv9rq-9r3trtnwQMffF7zsdEXrtZlmriBqEzF2eceDhkcRL4LTTpY-NI1M_XI1BoBYoMd-xtWaEOcEmxqT90Uv8UbfqGPpUp3Ozy57jrnq2XyFdZPN/s320/array_example_code_4.png&quot; width=&quot;265&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhocELeEFR-LX4VDuREG-PzfJC-_wAJTPawDatQbIIHI0HcUumFTn2TCaJiJHOSfBOG7c9ubhrBfMEdsmf0SKc2lB-vmwHsGS7zcXLmhTqVqetqC02hM3rtac9Omd6RdqJaVeUMO4TDQhDP/s1600/cpp_array_example_functions_3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhocELeEFR-LX4VDuREG-PzfJC-_wAJTPawDatQbIIHI0HcUumFTn2TCaJiJHOSfBOG7c9ubhrBfMEdsmf0SKc2lB-vmwHsGS7zcXLmhTqVqetqC02hM3rtac9Omd6RdqJaVeUMO4TDQhDP/s320/cpp_array_example_functions_3.png&quot; width=&quot;258&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;Display all items in list option 4&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2tH4s9H0acfooh7m5QI-heOjw2JbBWVFNHJypZLLJ-tuW_G4q35pnEBm4SUOak6vAONEyiR97XSDTBVJcCS7UxIq41zVADJLSALQqIi3-dbtP2nDkwjLcqiCOQ2cVJr8vkWkJQl3euuTb/s1600/cpp_project_array_functions_example_5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;array code simple project eample&quot; border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2tH4s9H0acfooh7m5QI-heOjw2JbBWVFNHJypZLLJ-tuW_G4q35pnEBm4SUOak6vAONEyiR97XSDTBVJcCS7UxIq41zVADJLSALQqIi3-dbtP2nDkwjLcqiCOQ2cVJr8vkWkJQl3euuTb/s320/cpp_project_array_functions_example_5.png&quot; title=&quot;enter option  c++ code&quot; width=&quot;246&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;This C++ project has developed by a student and can be improve student like you. You may found bugs in it but they are meant to be solve by you. It is very good for learning to change the logic or flow of code according to your need&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://fahad-cprogramming.blogspot.com/feeds/6364635729457641587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://fahad-cprogramming.blogspot.com/2016/09/array-based-list-c-simple-project.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/6364635729457641587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7946301980552876196/posts/default/6364635729457641587'/><link rel='alternate' type='text/html' href='http://fahad-cprogramming.blogspot.com/2016/09/array-based-list-c-simple-project.html' title='Array based list c++ simple project '/><author><name>Fahad Munir</name><uri>http://www.blogger.com/profile/10907419079479777165</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOz47G8lG8K_cjzRp8PhzHNWsbTgcXNkLO6sKFwLCVRHCpTtMRkLRq-ugmZBiDop4XCfFr9-7NHqYEhXO91kqf1QOITY_H5mKpniTPjonpj27-yZ6peMAin82E57dta662c67rEzWvwm-1/s72-c/array+cpp+project+example_1.png" height="72" width="72"/><thr:total>2</thr:total></entry></feed>