-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatm_withdrawl.fprg
77 lines (77 loc) · 4.4 KB
/
atm_withdrawl.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
<?xml version="1.0"?>
<flowgorithm fileversion="3.0">
<attributes>
<attribute name="name" value=""/>
<attribute name="authors" value="CB.EN.U4CYS22063"/>
<attribute name="about" value=""/>
<attribute name="saved" value="2022-11-18 11:22:46 AM"/>
<attribute name="created" value="Q0IuRU4uVTRDWVMyMjA2MzsyMDIyMjNNQVlDMDEwMDsyMDIyLTExLTE4OzA4OjU3OjQ5IEFNOzMwNzA="/>
<attribute name="edited" value="Q0IuRU4uVTRDWVMyMjA2MzsyMDIyMjNNQVlDMDEwMDsyMDIyLTExLTE4OzExOjIyOjQ2IEFNOzY7MzE2Ng=="/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<output expression=""welcome to atm"" newline="True"/>
<declare name="name" type="String" array="False" size=""/>
<output expression=""please enter your name"" newline="True"/>
<comment text="check your name is correct"/>
<input variable="name"/>
<declare name="acc" type="Integer" array="False" size=""/>
<output expression=""please enter your acc number"" newline="True"/>
<comment text="check your pin"/>
<input variable="acc"/>
<declare name="pin" type="Integer" array="False" size=""/>
<output expression=""please enter your pin"" newline="True"/>
<input variable="pin"/>
<declare name="balance" type="Real" array="False" size=""/>
<output expression=""please enter your balance"" newline="True"/>
<comment text="check your balance "/>
<input variable="balance"/>
<declare name="atm" type="Real" array="False" size=""/>
<output expression=""please enter your ammount you withdrawn"" newline="True"/>
<input variable="atm"/>
<if expression="balance>499">
<then>
<declare name="secret" type="Integer" array="False" size=""/>
<output expression=""please enter your pin"" newline="True"/>
<comment text="check your pin"/>
<input variable="secret"/>
<if expression="secret==pin">
<then>
<if expression="balance-atm>0">
<then>
<output expression=""transaction is successfulupdated account balanceis "&balance-atm" newline="True"/>
<if expression="balance-atm<500">
<then>
<output expression=""current balance is "&balance-atm& "please deposait money to maintain minimum balance otherwise you may attract penalities"" newline="True"/>
</then>
<else/>
</if>
</then>
<else>
<output expression=""transaction is unsuccesful due to to insufficient funds please run again and enter the amount to be withdrawn lower than" &balance" newline="True"/>
<breakpoint expression="" always="True"/>
</else>
</if>
</then>
<else>
<output expression=""in valid pin please run again and enter correct pin"" newline="True"/>
<breakpoint expression="" always="True"/>
</else>
</if>
</then>
<else>
<if expression="balance<0">
<then>
<output expression="" balance can' be negative pleaswe run again"" newline="True"/>
</then>
<else>
<output expression=""minimum bvalance for withdrawn is 500 due to insufficient funds this transcation can't be processed"" newline="True"/>
</else>
</if>
<breakpoint expression="" always="True"/>
</else>
</if>
</body>
</function>
</flowgorithm>