-
Notifications
You must be signed in to change notification settings - Fork 0
/
ATM.fprg
105 lines (105 loc) · 7.56 KB
/
ATM.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
94
95
96
97
98
99
100
101
102
103
104
105
<?xml version="1.0"?>
<flowgorithm fileversion="3.0">
<attributes>
<attribute name="name" value=""/>
<attribute name="authors" value="CB.EN.U4CYS22076"/>
<attribute name="about" value=""/>
<attribute name="saved" value="2022-11-18 10:17:20 AM"/>
<attribute name="created" value="Q0IuRU4uVTRDWVMyMjA3NjsyMDIyMjNNQVlDMDA5NTsyMDIyLTExLTE4OzA5OjA2OjA4IEFNOzMwNzc="/>
<attribute name="edited" value="Q0IuRU4uVTRDWVMyMjA3NjsyMDIyMjNNQVlDMDA5NTsyMDIyLTExLTE4OzEwOjE3OjIwIEFNOzU7MzE3Nw=="/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<output expression=""WELCOME TO SBI ATM"" newline="True"/>
<comment text="DECLARING VARIABLES"/>
<declare name="pin, AccountNumber, Balance, Withdrawal, PresentBalance, option, Newpin" type="Integer" array="False" size=""/>
<comment text="INPUT VALUES "/>
<assign variable="Balance" expression="1000"/>
<output expression=""Please enter your account number"" newline="True"/>
<input variable="AccountNumber"/>
<output expression=""Please enter the pin"" newline="True"/>
<input variable="Pin"/>
<comment text="USING IF TO CHEAK IF PIN IS CORRECT OR NOT"/>
<if expression="Pin=1234">
<then>
<comment text="PROVIDING THE OPTIONS FOR THE USER"/>
<output expression=""Your requeest is proseccing"" newline="True"/>
<output expression=""1)WITHDRAWAL"" newline="True"/>
<output expression=""2)PIN CHANGE"" newline="True"/>
<output expression=""3)DEPOSIT"" newline="True"/>
<output expression=""4)ACCOUNT BALANCE"" newline="True"/>
<output expression=""Please select the option by entering the number"" newline="True"/>
<input variable="option"/>
<comment text="INPUT THE SELECTED OPTION AS "option""/>
<comment text="CHEAKING WHICH OPTION IS TYPED BY THE USER"/>
<if expression="option=2">
<then>
<output expression=""PLEASE ENTER THE NEW PIN"" newline="True"/>
<output expression=""PLEASE CONFIRM THE NEW PIN"" newline="True"/>
<input variable="Newpin"/>
<output expression=""THANK YOU FOR USING SBI"" newline="True"/>
</then>
<else>
<if expression="option=3">
<then>
<output expression=""Please enter the amount you want to deposit"" newline="True"/>
<output expression=""Proseccing"" newline="True"/>
<output expression=""Your amount has deposited to your bank account"" newline="True"/>
<output expression=""THANK YOU FOR USING SBI"" newline="True"/>
</then>
<else>
<if expression="OPTION=4">
<then>
<output expression=""Account Number-"& AccountNumber" newline="True"/>
<output expression=""Account Balance" & Balance" newline="True"/>
<output expression=""THANK YOU FOR USING SBI"" newline="True"/>
</then>
<else>
<if expression="option=1">
<then>
<output expression=""Please enter the amount you want to withdraw"" newline="True"/>
<input variable="Withdrawal"/>
<assign variable="PresentBalance" expression="Balance-Withdrawal"/>
<if expression="PresentBalance<0">
<then>
<output expression=""Insufficent Funds"" newline="True"/>
<output expression=""THANK YOU FOR USING SBI"" newline="True"/>
</then>
<else>
<if expression="PresentBalance<501">
<then>
<output expression=""The current Bank balance is less than minimum balance,Please deposit the money"" newline="True"/>
<output expression=""Account Number"& AccountNumber" newline="True"/>
<output expression=""Present balance" &PresentBalance" newline="True"/>
<output expression=""THANK YOU FOR USING SBI"" newline="True"/>
</then>
<else>
<output expression=""Account Number"& AccountNumber" newline="True"/>
<output expression=""Present Balance"& PresentBalance" newline="True"/>
<output expression=""THANK YOU FOR USING SBI"" newline="True"/>
</else>
</if>
</else>
</if>
</then>
<else>
<output expression=""Please enter the valid option"" newline="True"/>
<output expression=""Try Again"" newline="True"/>
<comment text="IF AN OTHER OPTION IS TYPED THE THE REQUEST WILL BECOME INVALID"/>
</else>
</if>
</else>
</if>
</else>
</if>
</else>
</if>
</then>
<else>
<output expression=""The pin you have entered is not correct.Please try again"" newline="True"/>
</else>
</if>
</body>
</function>
</flowgorithm>