Repository navigation
Expand file tree
/
Copy pathq10.fprg
More file actions
45 lines (45 loc) · 2.03 KB
/
Copy pathq10.fprg
File metadata and controls
45 lines (45 loc) · 2.03 KB
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
<?xml version="1.0"?>
<flowgorithm fileversion="4.2">
<attributes>
<attribute name="name" value="q10"/>
<attribute name="authors" value="Divyam"/>
<attribute name="about" value=""/>
<attribute name="saved" value="2025-08-19 10:14:47 PM"/>
<attribute name="created" value="RGl2eWFtO0xBUFRPUC1LVTdINE1ESTsyMDI1LTA4LTE5OzA5OjM5OjU0IFBNOzI5ODU="/>
<attribute name="edited" value="RGl2eWFtO0xBUFRPUC1LVTdINE1ESTsyMDI1LTA4LTE5OzEwOjE0OjQ3IFBNOzE7MzA4MA=="/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<declare name="amount, a10, a5, a1" type="Integer" array="False" size=""/>
<assign variable="a10" expression="0"/>
<assign variable="a5" expression="0"/>
<assign variable="a1" expression="0"/>
<output expression=""Enter the amount "" newline="True"/>
<input variable="amount"/>
<while expression="amount-10>0">
<assign variable="amount" expression="amount-10"/>
<assign variable="a10" expression="a10+1"/>
</while>
<if expression="amount=10">
<then>
<assign variable="a10" expression="a10+1"/>
</then>
<else>
<if expression="amount>5">
<then>
<assign variable="a5" expression="1"/>
<assign variable="a1" expression="amount-5"/>
</then>
<else>
<assign variable="a1" expression="amount"/>
</else>
</if>
</else>
</if>
<output expression=""10 rs :" &a10" newline="True"/>
<output expression=""5rs : "&a5" newline="True"/>
<output expression=""1 rs "& a1" newline="True"/>
</body>
</function>
</flowgorithm>