-
Notifications
You must be signed in to change notification settings - Fork 0
/
SIMPLE ATM.fprg
64 lines (64 loc) · 4.27 KB
/
SIMPLE 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
<?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 11:21:25 AM"/>
<attribute name="created" value="Q0IuRU4uVTRDWVMyMjA3NjsyMDIyMjNNQVlDMDA5NTsyMDIyLTExLTE4OzExOjExOjM3IEFNOzMwNjg="/>
<attribute name="edited" value="Q0IuRU4uVTRDWVMyMjA3NjsyMDIyMjNNQVlDMDA5NTsyMDIyLTExLTE4OzExOjEyOjQzIEFNOzI7Q0IuRU4uVTRDWVMyMjA3NjsyMDIyMjNNQVlDMDA5NTsyMDIyLTExLTE4OzA5OjA2OjA4IEFNO0FUTS5mcHJnOzcwNzM="/>
<attribute name="edited" value="Q0IuRU4uVTRDWVMyMjA3NjsyMDIyMjNNQVlDMDA5NTsyMDIyLTExLTE4OzExOjIxOjI1IEFNOzQ7MzE3Nw=="/>
</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, Pin1" type="Integer" array="False" size=""/>
<comment text="INPUT VALUES "/>
<assign variable="Balance" expression="1000"/>
<assign variable="Pin" expression="1234"/>
<output expression=""Please enter your account number"" newline="True"/>
<input variable="AccountNumber"/>
<output expression=""Please enter the pin"" newline="True"/>
<input variable="Pin1"/>
<if expression="Pin=Pin1">
<then>
<comment text="IF THE PIN IS CORRECT THEN IT WILL ASK FOR THE AMOUNT FOR ITS WITHDRAWAL"/>
<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>
<comment text="IF THE PRESENT BALANCE LESS THAN ZERO THE IT DISPLAYS INSUFFICIENT FUNDS"/>
<output expression=""Insufficent Funds"" newline="True"/>
<output expression=""THANK YOU FOR USING SBI"" newline="True"/>
</then>
<else>
<comment text="THE MINIMUM BALANCE IS 500"/>
<comment text="IF THE PRESENT BALANCE IS LESS THAN 500 THEN IT DISPLAYS THE "CURRENT BANK BALANCE IS LESS THAN MINIMUM BALANCE, PLEASE DEPOSIT THE AS SOON AS POSSIBLE""/>
<if expression="PresentBalance<501">
<then>
<output expression=""The current Bank balance is less than minimum balance,Please deposit the money as soon as possible"" 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>
<comment text="IF THE USER ENTERED THE INCORRECT PIN IT WILL SHOW TO TRY AGAIN"/>
<output expression=""You have entered the incorrect pin"" newline="True"/>
<output expression=""Please try again"" newline="True"/>
</else>
</if>
</body>
</function>
</flowgorithm>