-
Notifications
You must be signed in to change notification settings - Fork 0
/
CALCULATOR.fprg
54 lines (54 loc) · 2.32 KB
/
CALCULATOR.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
<?xml version="1.0"?>
<flowgorithm fileversion="2.11">
<attributes>
<attribute name="name" value=""/>
<attribute name="authors" value="Admin"/>
<attribute name="about" value=""/>
<attribute name="saved" value="2021-12-08 02:22:29 PM"/>
<attribute name="created" value="QWRtaW47UEVBQ0g7MjAyMS0xMi0wODswMjowMTozOSBQTTsyMTE3"/>
<attribute name="edited" value="QWRtaW47UEVBQ0g7MjAyMS0xMi0wODswMjoyMjoyOSBQTTsxOzIyMjc="/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<declare name="a, b" type="Real" array="False" size=""/>
<declare name="s" type="String" array="False" size=""/>
<declare name="c" type="Integer" array="False" size=""/>
<assign variable="c" expression="1"/>
<while expression="c!=0">
<output expression=""Enter the two numbers."" newline="True"/>
<input variable="a"/>
<input variable="b"/>
<output expression=""Enter the operation to be performed. (+,-,*,/)"" newline="True"/>
<input variable="s"/>
<if expression="s="+"">
<then>
<output expression="a+b" newline="True"/>
</then>
<else/>
</if>
<if expression="s="-"">
<then>
<output expression="a-b" newline="True"/>
</then>
<else/>
</if>
<if expression="s="*"">
<then>
<output expression="a*b" newline="True"/>
</then>
<else/>
</if>
<if expression="s="/"">
<then>
<output expression="a/b" newline="True"/>
</then>
<else/>
</if>
<output expression=""Reset calculator? yes - enter 1 no - enter 0"" newline="True"/>
<input variable="c"/>
</while>
<output expression=""end."" newline="True"/>
</body>
</function>
</flowgorithm>