-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddition of n terms -17.fprg
27 lines (27 loc) · 1.31 KB
/
addition of n terms -17.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
<?xml version="1.0"?>
<flowgorithm fileversion="3.0">
<attributes>
<attribute name="name" value=""/>
<attribute name="authors" value="CB.EN.U4CYS22017"/>
<attribute name="about" value=""/>
<attribute name="saved" value="2022-12-02 09:22:53 AM"/>
<attribute name="created" value="Q0IuRU4uVTRDWVMyMjAxNzsyMDIyMjNNQVlDMDA1NDsyMDIyLTEyLTAyOzA5OjA3OjI2IEFNOzMwNjI="/>
<attribute name="edited" value="Q0IuRU4uVTRDWVMyMjAxNzsyMDIyMjNNQVlDMDA1NDsyMDIyLTEyLTAyOzA5OjIyOjUzIEFNOzE7MzE2Nw=="/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<declare name="n, i" type="Integer" array="False" size=""/>
<declare name="sum" type="Integer" array="False" size=""/>
<comment text="declared the variables "/>
<assign variable="sum" expression="0"/>
<output expression=""enter value for n"" newline="True"/>
<input variable="n"/>
<for variable="i" start="1" end="n" direction="inc" step="1">
<comment text="assigned the exoression for the sum of n terms"/>
<assign variable="sum" expression="sum+i"/>
</for>
<output expression="sum" newline="True"/>
</body>
</function>
</flowgorithm>