-
Notifications
You must be signed in to change notification settings - Fork 0
/
atm.fprg
66 lines (66 loc) · 3.89 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
<?xml version="1.0"?>
<flowgorithm fileversion="3.0">
<attributes>
<attribute name="name" value=""/>
<attribute name="authors" value="cb.en.u4cys22074"/>
<attribute name="about" value=""/>
<attribute name="saved" value="2022-11-18 10:11:45 AM"/>
<attribute name="created" value="Y2IuZW4udTRjeXMyMjA3NDsyMDIyMjNNQVlDMDA1OTsyMDIyLTExLTE4OzA5OjAxOjEzIEFNOzMzMjI="/>
<attribute name="edited" value="Y2IuZW4udTRjeXMyMjA3NDsyMDIyMjNNQVlDMDA1OTsyMDIyLTExLTE4OzEwOjExOjQ1IEFNOzk7MzQzNg=="/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<output expression=""welcome,please insert your card"" newline="True"/>
<comment text="working of an atm machine"/>
<declare name="name" type="String" array="False" size=""/>
<output expression=""enter your name"" newline="True"/>
<input variable="name"/>
<declare name="accno" type="Integer" array="False" size=""/>
<output expression=""enter your accno"" newline="True"/>
<input variable="accno"/>
<declare name="currentbalance" type="Real" array="False" size=""/>
<output expression=""enter your current balance"" newline="True"/>
<input variable="currentbalance"/>
<declare name="pin1" type="Integer" array="False" size=""/>
<comment text="your pin is entered for security purposes"/>
<output expression=""enter yuor pin"" newline="True"/>
<input variable="pin1"/>
<declare name="withdrawelamount" type="Integer" array="False" size=""/>
<output expression=""enter the amount to withdraw"" newline="True"/>
<input variable="withdrawelamount"/>
<if expression="currentbalance>withdrawelamount">
<then>
<comment text="your pin will be rechecked"/>
<declare name="pin2" type="Integer" array="False" size=""/>
<output expression=""enter your pin"" newline="True"/>
<input variable="pin2"/>
<if expression="pin1=pin2">
<then>
<declare name="balance" type="Integer" array="False" size=""/>
<if expression="balance<500">
<then>
<comment text="if your balance is less than 500 you not be able to withdraw"/>
<output expression=""your balance is"& currentbalance-withdrawelamount" newline="True"/>
<output expression=""currently your balance is less than 500 so that you cannot withdraw the money"" newline="True"/>
</then>
<else>
<assign variable="balance" expression="currentbalance-withdrawelamount"/>
<comment text="your balance after withdrawel"/>
<output expression=""your balance is"&balance" newline="True"/>
</else>
</if>
</then>
<else>
<output expression=""sorry your pin is incorrect"" newline="True"/>
</else>
</if>
</then>
<else>
<comment text="you will not be able to withdraw the mpney if the current balance is less than 500"/>
<output expression=""sorry your current balance is less than withdrawelamount"" newline="True"/>
</else>
</if>
</body>
</function>
</flowgorithm>