-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatm pin change and deposit.fprg
93 lines (93 loc) · 6.23 KB
/
atm pin change and deposit.fprg
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
<?xml version="1.0"?>
<flowgorithm fileversion="3.0">
<attributes>
<attribute name="name" value=""/>
<attribute name="authors" value="student"/>
<attribute name="about" value=""/>
<attribute name="saved" value="2022-11-18 10:52:28 AM"/>
<attribute name="created" value="c3R1ZGVudDsyMDIyMjNNQVlDMDA0NjsyMDIyLTExLTE4OzA5OjA3OjQ2IEFNOzI4NDY="/>
<attribute name="edited" value="c3R1ZGVudDsyMDIyMjNNQVlDMDA0NjsyMDIyLTExLTE4OzEwOjUyOjI4IEFNOzI7Mjk0Nw=="/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<output expression=""welcome to karur vysya bank"" newline="True"/>
<output expression=""please insert your card"" newline="True"/>
<declare name="accno" type="Integer" array="False" size=""/>
<comment text="account number is assigned"/>
<assign variable="accno" expression="123456"/>
<declare name="newpin" type="Integer" array="False" size=""/>
<output expression=""please enter your account number"" newline="True"/>
<comment text="account number is taken as input"/>
<input variable="accno"/>
<if expression="accno=123456">
<then>
<declare name="balance" type="Integer" array="False" size=""/>
<comment text="balance is 800"/>
<assign variable="balance" expression="800"/>
<declare name="amount" type="Integer" array="False" size=""/>
<output expression=""enter the amount you want to withdrawl"" newline="True"/>
<comment text="amount you want to witdrawl is taken "/>
<input variable="amount"/>
<if expression="amount>=500">
<then>
<comment text="if amount is greater than 500 then only it is continued "/>
<declare name="atmpin" type="Integer" array="False" size=""/>
<output expression=""enter your 4 digit pin number"" newline="True"/>
<comment text="pin number is taken"/>
<input variable="atmpin"/>
<if expression="atmpin=2418">
<then>
<declare name="leftoutbalance" type="Integer" array="False" size=""/>
<declare name="deposit" type="Integer" array="False" size=""/>
<comment text="leftoutbalance is caluculated "/>
<assign variable="leftoutbalance" expression="balance-amount"/>
<output expression=""The remaining balance in your account is " & leftoutbalance" newline="True"/>
<output expression=""if you want to deposit the amount please enter the number 1"" newline="True"/>
<input variable="deposit"/>
<if expression="deposit=1">
<then>
<comment text="if you want to deposit "/>
<output expression=""enter the amount you want to deposit"" newline="True"/>
<input variable="deposit"/>
<declare name="newbalance" type="Integer" array="False" size=""/>
<comment text="new balance is caluculated"/>
<assign variable="newbalance" expression="leftoutbalance+deposit"/>
<comment text="new balance is shown"/>
<output expression=""the new balance is " & newbalance" newline="True"/>
<output expression=""if you want to enter the new pin enter the number 2"" newline="True"/>
<input variable="newpin"/>
<if expression="newpin=2">
<then>
<output expression=""enter the new pin"" newline="True"/>
<input variable="newpin"/>
<comment text="pin is changed"/>
<output expression=""your pin has been now successfully changed"" newline="True"/>
<assign variable="atmpin" expression="newpin"/>
<comment text="new pin is shown"/>
<output expression=""your new pin is now"& newpin" newline="True"/>
<output expression=""and you new balance is "& newbalance" newline="True"/>
</then>
<else/>
</if>
</then>
<else/>
</if>
</then>
<else>
<output expression=""false pin number"" newline="True"/>
</else>
</if>
</then>
<else>
<output expression=""no min balance"" newline="True"/>
</else>
</if>
</then>
<else>
<output expression=""wrong account number"" newline="True"/>
</else>
</if>
</body>
</function>
</flowgorithm>