-
Notifications
You must be signed in to change notification settings - Fork 0
/
addition_series.fprg
34 lines (34 loc) · 1.65 KB
/
addition_series.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
<?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-12-02 10:44:42 AM"/>
<attribute name="created" value="Y2IuZW4udTRjeXMyMjA3NDsyMDIyMjNNQVlDMDA3MjsyMDIyLTEyLTAyOzA5OjM1OjUwIEFNOzMzMTk="/>
<attribute name="edited" value="Y2IuZW4udTRjeXMyMjA3NDsyMDIyMjNNQVlDMDA3MjsyMDIyLTEyLTAyOzEwOjQ0OjQyIEFNOzEwOzM0Njg="/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<comment text="declaring variables"/>
<declare name="j, i, n, a, b" type="Integer" array="False" size=""/>
<output expression=""enter the value of n"" newline="True"/>
<comment text="recieving n value"/>
<input variable="n"/>
<assign variable="i" expression="0"/>
<assign variable="j" expression="1"/>
<assign variable="a" expression="1"/>
<comment text="while loop "/>
<while expression="a<=n">
<comment text="for loop for adding numbers"/>
<for variable="a" start="1" end="n" direction="inc" step="1">
<assign variable="b" expression="i+j"/>
<output expression="i&"+"&j&"="&b" newline="True"/>
<assign variable="i" expression="j"/>
<assign variable="j" expression="b"/>
</for>
</while>
</body>
</function>
</flowgorithm>