Repository navigation
Expand file tree
/
Copy pathSourcecode.cpp
More file actions
839 lines (839 loc) · 25.7 KB
/
Copy pathSourcecode.cpp
File metadata and controls
839 lines (839 loc) · 25.7 KB
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
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
#include<iostream>
#include<string>
using namespace std;
int menu()
{
int menu_choice;
cout << "\nPress (1) to withdraw cash " << endl;
cout << "Press (2) for Balance Inquiry " << endl;
cout << "Press (3) for Funds Transfer " << endl;
cout << "Press (4) for Bill Payments " << endl;
cin >> menu_choice;
return menu_choice;
}
int withdraw()
{
int withdraw_choice;
cout << "\nPress (1) to Widthdraw 1,000 " << endl;
cout << "Press (2) to Widthdraw 5,000 " << endl;
cout << "Press (3) to Widthdraw 10,000 " << endl;
cout << "Press (4) Widthdraw 25,000 " << endl;
cout << "Press (5) to Widthdraw Custom Amount " << endl;
cin >> withdraw_choice;
return withdraw_choice;
}
float c_withdraw(int wd_amount, float balance)
{
float tax;
cout << "0.6% tax will be deducted on cash withdraw" << endl;
tax = (0.6 / 100) * wd_amount;
balance = balance - (wd_amount + tax);
return balance;
}
float s_withdraw(int wd_amount, float balance)
{
balance = balance - wd_amount;
return balance;
}
float recipt(float balance)
{
char slp;
cout << "\nDo you want to print the slip" << endl;
cout << "Rs. 2.5 will be deducted for printing the slip" << endl;
cout << "Press 'y' or 'Y' to print the slip" << endl;
cout << "Press any other key to exit" << endl;
cin >> slp;
if (slp == 'y' || slp == 'Y')
{
return balance = balance - 2.5;
}
else
{
return balance;
}
}
int fund_menu()
{
int fund_choice;
cout << "\nPress (1) for Foreign Fund Transfer (International Banks)" << endl;
cout << "Press (2) for Local Fund Transfer (Same Local Bank)" << endl;
cout << "Press (3) for Local Fund Transfer (Other Local Banks)" << endl;
cin >> fund_choice;
return fund_choice;
}
int inter_fund_menu()
{
int inter_fund_choice;
cout << "\nIn which Currency you want to Transfer Funds Internationally?!" << endl;
cout << "\nPress (1) from Rs to Dollars " << endl;
cout << "Press (2) from Rs to Euros " << endl;
cout << "Press (3) from Rs to Pounds " << endl;
cout << "Prss (4) from Rs to Lira " << endl;
cin >> inter_fund_choice;
return inter_fund_choice;
}
void account_vr()
{
string tr_account;
do {
cout << "\nEnter 16-digit Account No. in which you want to transfer money = ";
cin >> tr_account;
if (tr_account.size() == 16)
{
cout << "Please wait while we access this account........." << endl;
}
else
{
cout << "\nError! Invalid Account No." << endl;
}
} while (tr_account.size() != 16);
}
int dollar_rate()
{
int rs_dollar;
cout << "Current Rate of 1 Dollar in Pakistan is \"Rs.226.2\"" << endl;
cout << "Enter Rs amount you want to Transfer to Foreign Account in Dollars($)" << endl;
cin >> rs_dollar;
return rs_dollar;
}
int balance_check(int amount,float balance)
{
do
{
if (amount >= (balance - 100))
{
cout << "Error! Minimum Rs.1000 must be avaiable in your account OR The amount you enter is more than the actual amount in your account" << endl;
cout << "Enter amount again" << endl;
cin >> amount;
}
} while (amount >= (balance - 1000));
return amount;
}
float dollar_fund_transfer(float dollar_fund,float balance)
{
float rem_balance, dollar = 226.2;
dollar = dollar_fund / dollar;
rem_balance = recipt(balance) - dollar_fund;
cout << "After conversion from Rs to Dollars, you transfer " << dollar << "$" << endl;
return (rem_balance);
}
int euro_rate()
{
int rs_euro;
cout << "Current Rate of 1 Euro in Pakistan is \"Rs.241.5\"" << endl;
cout << "Enter Rs amount you want to Transfer to Foreign Account in Euro" << endl;
cin >> rs_euro;
return rs_euro;
}
float euro_fund_transfer(float euro_fund,float balance)
{
float rem_balance, dollar = 241.5;
dollar = euro_fund / dollar;
rem_balance = recipt(balance) - euro_fund;
cout << "After conversion from Rs to Euro, you transfer " << dollar << "$" << endl;
return (rem_balance);
}
int pound_rate()
{
int rs_pound;
cout << "Current Rate of 1 Euro in Pakistan is \"Rs.274.2\"" << endl;
cout << "Enter Rs amount you want to Transfer to Foreign Account in Euro" << endl;
cin >> rs_pound;
return rs_pound;
}
float pound_fund_transfer(float pound_fund, float balance)
{
float rem_balance, pound = 274.2;
pound = pound_fund / pound;
rem_balance = recipt(balance) - pound_fund;
cout << "After conversion from Rs to Euro, you transfer " << pound << endl;
return (rem_balance);
}
int lira_rate()
{
int rs_lira;
cout << "Current Rate of 1 Euro in Pakistan is \"Rs.12.4\"" << endl;
cout << "Enter Rs amount you want to Transfer to Foreign Account in Euro" << endl;
cin >> rs_lira;
return rs_lira;
}
float lira_fund_transfer(float lira_fund, float balance)
{
float rem_balance, lira = 14.4;
lira = lira_fund / lira;
rem_balance = recipt(balance) - lira_fund;
cout << "After conversion from Rs to lira, you transfer " << lira << endl;
return (rem_balance);
}
float same_local_transfer(float rs_same,float balance)
{
balance = recipt(balance) - rs_same;
return (balance);
}
float diff_local_transfer(float rs_diff,float balance)
{
float tax;
cout << "0.3% tax will be deducted from your account balance" << endl;
tax = (0.3 / 100) * rs_diff;
rs_diff = tax + rs_diff;
balance = recipt(balance) - rs_diff;
return (balance);
}
int bill_menu()
{
int bill_choice;
cout << "\nPress (1) for Utility Bills" << endl;
cout << "Press (2) for 1 Bill Invoice" << endl;
cin >> bill_choice;
return bill_choice;
}
int utility_menu()
{
int utility_choice;
cout << "\nPress (1) for Electricity Bill" << endl;
cout << "Press (2) for Gas Bill" << endl;
cin >> utility_choice;
return utility_choice;
}
void reference_no()
{
string tr_reference;
do {
cout << "Enter 14 digit Reference No. written on your bill = ";
cin >> tr_reference;
if (tr_reference.size() == 14)
{
cout << "Please wait while we are Processing your Bill........." << endl;
}
else
{
cout << "Invalid Reference No." << endl;
cout << "Enter 14-digit Reference No. again" << endl;
}
} while (tr_reference.size() != 14);
}
float utility_bill(int bill,float balance)
{
balance = recipt(balance) - bill;
return (balance);
}
void consumer_no()
{
string tr_consumer;
do {
cout << "Enter 17 digit Consumer No. written on your bill = ";
cin >> tr_consumer;
if (tr_consumer.size() == 17)
{
cout << "Please wait while we are Processing your Bill........." << endl;
}
else
{
cout << "Invalid Consumer No." << endl;
cout << "Enter 17-digit Consumer No. again" << endl;
}
} while (tr_consumer.size() != 17);
}
float one_bill(float bill,float balance)
{
balance = recipt(balance) - bill;
return (balance);
}
void main()
{
cout << "\t************* Welcome to ATM *************" << endl << endl;
int card;
char reuse;
float balance = 100000.00;
do
{
do
{
//Enter Card
cout << "\nEnter card and press 1 : ";
cin >> card;
if (card == 1)
{
//verification
string account_no, pin;
do
{
cout << "\nEnter 16 digit accout number : ";
cin >> account_no;
cout << "Enter 4 digit pin : ";
cin >> pin;
if (account_no.size() == 16 && pin.size() == 4)
{
//Account Type
int account_type;
do
{
cout << "\nPress (1) for Current Account " << endl;
cout << "Press (2) for Saving Account " << endl;
cin >> account_type;
switch (account_type)
{
//--------------------CURRENT ACCOUNT------------------------------------
case 1:
{
int menu_choice;
do
{
//menu
menu_choice = menu();
switch (menu_choice)
{
//withdraw cash
case 1:
{
int withdraw_choice;
do
{
//withdraw menu
withdraw_choice = withdraw();
switch (withdraw_choice)
{
//1000 withdraw
case 1:
{
int wd_amount = 1000;
balance = c_withdraw(wd_amount, balance);
balance = recipt(balance);
cout << "\nPlease wait transaction is in process...." << endl;
cout << "Your remaining Bank balance is : " << balance << endl;
break;
}
//5000 withdraw
case 2:
{
int wd_amount = 5000;
balance = c_withdraw(wd_amount, balance);
balance = recipt(balance);
cout << "\nPlease wait transaction is in process...." << endl;
cout << "Your remaining Bank balance is : " << balance << endl;
break;
}
//10,000 withdraw
case 3:
{
int wd_amount = 10000;
balance = c_withdraw(wd_amount, balance);
balance = recipt(balance);
cout << "\nPlease wait transaction is in process...." << endl;
cout << "Your remaining Bank balance is : " << balance << endl;
break;
}
//withdraw 25000
case 4:
{
int wd_amount = 25000;
balance = c_withdraw(wd_amount, balance);
balance = recipt(balance);
cout << "\nPlease wait transaction is in process...." << endl;
cout << "Your remaining Bank balance is : " << balance << endl;
break;
}
//custom amount withdraw
case 5:
{
int wd_amount;
do
{
cout << "\nEnter amount you want to withdraw " << endl;
cout << "You can only withdraw in multiple of 500 and not more than 25000 " << endl;
cin >> wd_amount;
if (wd_amount % 500 == 0 && wd_amount <= 25000)
{
balance = c_withdraw(wd_amount, balance);
balance = recipt(balance);
cout << "\nPlease wait transaction is in process...." << endl;
cout << "Your remaining Bank balance is : " << balance << endl;
}
else
{
cout << "\nError! Enter amount in multiple of 500 and not more than 25000 " << endl;
}
} while (wd_amount % 500 != 0 || wd_amount > 25000);
break;
}
default:
{
cout << "\nError! Please Enter correct choice " << endl;
}
}
} while (withdraw_choice != 1 && withdraw_choice != 2 && withdraw_choice != 3 && withdraw_choice != 4 && withdraw_choice != 5);
break;
}
// balance inquiry
case 2:
{
recipt(balance);
cout << "\n Your account Balance is balance : " << balance << endl;
break;
}
//fund tranfer
case 3:
{
int fund_choice;
do
{
//fund tranfer menu
fund_choice = fund_menu();
switch (fund_choice)
{
//internatioal tranfer
case 1:
{
int inter_fund_choice;
do
{
//international fund menu
inter_fund_choice = inter_fund_menu();
switch (inter_fund_choice)
{
//Doller tranfer
case 1:
{
account_vr();
int amount = dollar_rate();
amount = balance_check(amount,balance);
cout << "Your Remaining Account Balance after Transaction is = " << dollar_fund_transfer(amount,balance) << " Rs" << endl;
break;
}
//Euro transfer
case 2:
{
account_vr();
int amount = euro_rate();
amount = balance_check(amount, balance);
cout << "Your Remaining Account Balance after Transaction is = " << euro_fund_transfer(amount, balance) << " Rs" << endl;
break;
}
//Pound transfer
case 3:
{
account_vr();
int amount = pound_rate();
amount = balance_check(amount, balance);
cout << "Your Remaining Account Balance after Transaction is = " << pound_fund_transfer(amount, balance) << " Rs" << endl;
break;
}
//Lira tranfer
case 4:
{
account_vr();
int amount = lira_rate();
amount = balance_check(amount, balance);
cout << "Your Remaining Account Balance after Transaction is = " << lira_fund_transfer(amount, balance) << " Rs" << endl;
break;
}
default:
{
cout << "\nError! Please enter correct choice " << endl;
}
}
} while (inter_fund_choice != 1 && inter_fund_choice != 2 && inter_fund_choice != 3 && inter_fund_choice != 4);
break;
}
//same local bank transfer
case 2:
{
account_vr();
int rs_samelocal;
cout << "Enter Rs amount you want to transfer to other account " << endl;
cin >> rs_samelocal;
int amount = balance_check(rs_samelocal,balance);
cout << "Your Remaining Account Balance after transaction is = " << same_local_transfer(amount,balance) << endl;
break;
}
//other bank transfer
case 3:
{
account_vr();
int rs_diff_local;
cout << "Enter Rs amount you want to transfer to other account " << endl;
cin >> rs_diff_local;
int amount = balance_check(rs_diff_local,balance);
cout << "Your Remaining Account Balance after transaction is = " << diff_local_transfer(amount,balance) << endl;
break;
}
default:
{
cout << "\nError! Please Enter a correct choice" << endl;
}
}
} while (fund_choice != 1 && fund_choice != 2 && fund_choice != 3);
break;
}
//bill payment
case 4:
{
int bill_choice;
do
{
//bill menu
bill_choice = bill_menu();
switch (bill_choice)
{
case 1:
{
//uitility bill
int utility_choice;
do
{
//utility bill menu
utility_choice = utility_menu();
switch (utility_choice)
{
//electric bill
case 1:
{
int elec_bill;
reference_no();
cout << "Enter your Bill Amount " << endl;
cin >> elec_bill;
int amount = balance_check(elec_bill,balance);
cout << "Your Remaining Account Balance after Bill Payment is = " << utility_bill(amount,balance) << endl;
break;
}
//gas bill
case 2:
{
int gas_bill;
reference_no();
cout << "Enter your Bill Amount " << endl;
cin >> gas_bill;
int amount = balance_check(gas_bill, balance);
cout << "Your Remaining Account Balance after Bill Payment is = " << utility_bill(amount, balance) << endl;
break;
}
default:
{
cout << "\nError! Please enter correct choice" << endl;
}
}
} while (utility_choice != 1 && utility_choice != 2);
break;
}
// one bill payment
case 2:
{
int amount;
consumer_no();
cout << "Enter your Bill Amount" << endl;
cin >> amount;
amount = balance_check(amount,balance);
cout << "Your Remaining Account balance after payment is = " << one_bill(amount,balance) << endl;
break;
}
default:
{
cout << "\nError! Please Enter correct choice " << endl;
}
}
} while (bill_choice != 1 && bill_choice != 2);
break;
}
default:
{
cout << "\nPlease Enter correct choice" << endl;
}
}
} while (menu_choice != 1 && menu_choice != 2 && menu_choice != 3 && menu_choice != 4);
break;
}
//-------------------------SAVING ACCOUTN----------------------------------
case 2:
{
int menu_choice;
do
{
//menu
menu_choice = menu();
switch (menu_choice)
{
//withdraw cash
case 1:
{
int withdraw_choice;
do
{
//withdraw menu
withdraw_choice = withdraw();
switch (withdraw_choice)
{
//1000 withdraw
case 1:
{
int wd_amount = 1000;
balance = s_withdraw(wd_amount, balance);
balance = recipt(balance);
cout << "\nPlease wait transaction is in process...." << endl;
cout << "Your remaining Bank balance is : " << balance << endl;
break;
}
//5000 withdraw
case 2:
{
int wd_amount = 5000;
balance = s_withdraw(wd_amount, balance);
balance = recipt(balance);
cout << "\nPlease wait transaction is in process...." << endl;
cout << "Your remaining Bank balance is : " << balance << endl;
break;
}
//10,000 withdraw
case 3:
{
int wd_amount = 10000;
balance = s_withdraw(wd_amount, balance);
balance = recipt(balance);
cout << "\nPlease wait transaction is in process...." << endl;
cout << "Your remaining Bank balance is : " << balance << endl;
break;
}
//withdraw 25000
case 4:
{
int wd_amount = 25000;
balance = s_withdraw(wd_amount, balance);
balance = recipt(balance);
cout << "\nPlease wait transaction is in process...." << endl;
cout << "Your remaining Bank balance is : " << balance << endl;
break;
}
//custom amount withdraw
case 5:
{
int wd_amount;
do
{
cout << "\nEnter amount you want to withdraw " << endl;
cout << "You can only withdraw in multiple of 500 and not more than 50000 " << endl;
cin >> wd_amount;
if (wd_amount % 500 == 0 && wd_amount <= 50000)
{
balance = s_withdraw(wd_amount, balance);
balance = recipt(balance);
cout << "\nPlease wait transaction is in process...." << endl;
cout << "Your remaining Bank balance is : " << balance << endl;
}
else
{
cout << "\nError! Enter amount in multiple of 500 and not more than 50000 " << endl;
}
} while (wd_amount % 500 != 0 || wd_amount > 50000);
break;
}
default:
{
cout << "\nError! Please Enter correct choice " << endl;
}
}
} while (withdraw_choice != 1 && withdraw_choice != 2 && withdraw_choice != 3 && withdraw_choice != 4 && withdraw_choice != 5);
break;
}
// balance inquiry
case 2:
{
recipt(balance);
cout << "\n Your account Balance is balance : " << balance << endl;
break;
}
//fund tranfer
case 3:
{
int fund_choice;
do
{
//fund tranfer menu
fund_choice = fund_menu();
switch (fund_choice)
{
//internatioal tranfer
case 1:
{
int inter_fund_choice;
do
{
//international fund menu
inter_fund_choice = inter_fund_menu();
switch (inter_fund_choice)
{
//Doller tranfer
case 1:
{
account_vr();
int amount = dollar_rate();
amount = balance_check(amount, balance);
cout << "Your Remaining Account Balance after Transaction is = " << dollar_fund_transfer(amount, balance) << " Rs" << endl;
break;
}
//Euro transfer
case 2:
{
account_vr();
int amount = euro_rate();
amount = balance_check(amount, balance);
cout << "Your Remaining Account Balance after Transaction is = " << euro_fund_transfer(amount, balance) << " Rs" << endl;
break;
}
//Pound transfer
case 3:
{
account_vr();
int amount = pound_rate();
amount = balance_check(amount, balance);
cout << "Your Remaining Account Balance after Transaction is = " << pound_fund_transfer(amount, balance) << " Rs" << endl;
break;
}
//Lira tranfer
case 4:
{
account_vr();
int amount = lira_rate();
amount = balance_check(amount, balance);
cout << "Your Remaining Account Balance after Transaction is = " << lira_fund_transfer(amount, balance) << " Rs" << endl;
break;
}
default:
{
cout << "\nError! Please enter correct choice " << endl;
}
}
} while (inter_fund_choice != 1 && inter_fund_choice != 2 && inter_fund_choice != 3 && inter_fund_choice != 4);
break;
}
//same local bank transfer
case 2:
{
account_vr();
int rs_samelocal;
cout << "Enter Rs amount you want to transfer to other account " << endl;
cin >> rs_samelocal;
int amount = balance_check(rs_samelocal, balance);
cout << "Your Remaining Account Balance after transaction is = " << same_local_transfer(amount, balance) << endl;
break;
}
//other bank transfer
case 3:
{
account_vr();
int rs_diff_local;
cout << "Enter Rs amount you want to transfer to other account " << endl;
cin >> rs_diff_local;
int amount = balance_check(rs_diff_local, balance);
cout << "Your Remaining Account Balance after transaction is = " << diff_local_transfer(amount, balance) << endl;
break;
}
default:
{
cout << "\nError! Please Enter a correct choice" << endl;
}
}
} while (fund_choice != 1 && fund_choice != 2 && fund_choice != 3);
break;
}
//bill payment
case 4:
{
int bill_choice;
do
{
//bill menu
bill_choice = bill_menu();
switch (bill_choice)
{
case 1:
{
//uitility bill
int utility_choice;
do
{
//utility bill menu
utility_choice = utility_menu();
switch (utility_choice)
{
//electric bill
case 1:
{
int elec_bill;
reference_no();
cout << "Enter your Bill Amount " << endl;
cin >> elec_bill;
int amount = balance_check(elec_bill, balance);
cout << "Your Remaining Account Balance after Bill Payment is = " << utility_bill(amount, balance) << endl;
break;
}
//gas bill
case 2:
{
int gas_bill;
reference_no();
cout << "Enter your Bill Amount " << endl;
cin >> gas_bill;
int amount = balance_check(gas_bill, balance);
cout << "Your Remaining Account Balance after Bill Payment is = " << utility_bill(amount, balance) << endl;
break;
}
default:
{
cout << "\nError! Please enter correct choice" << endl;
}
}
} while (utility_choice != 1 && utility_choice != 2);
break;
}
// one bill payment
case 2:
{
int amount;
consumer_no();
cout << "Enter your Bill Amount" << endl;
cin >> amount;
amount = balance_check(amount, balance);
cout << "Your Remaining Account balance after payment is = " << one_bill(amount, balance) << endl;
break;
}
default:
{
cout << "\nError! Please Enter correct choice " << endl;
}
}
} while (bill_choice != 1 && bill_choice != 2);
break;
}
default:
{
cout << "\nPlease Enter correct choice" << endl;
}
}
} while (menu_choice != 1 && menu_choice != 2 && menu_choice != 3 && menu_choice != 4);
break;
}
default:
{
cout << "\nPlease Enter correct choice" << endl;
}
}
} while (account_type != 1 && account_type != 2);
}
else
{
cout << "Error! Incorrect Pin or Account number " << endl;
cout << "Please Enter again" << endl;
}
} while (account_no.size() != 16 || pin.size() != 4);
}
else
{
cout << "Error! Please Enter 1 only " << endl;
}
} while (card != 1);
cout << "\nPress Y or y to reuse to ATM " << endl;
cout << "Press any other key to Exit" << endl;
cin >> reuse;
} while (reuse == 'y' || reuse == 'Y');
cout << "\t\n***** Hope Your like our Service *****" << endl;
cout << "****** Thanks for your visit *****" << endl << endl;
}