Upload files to "/"
This commit is contained in:
38
MG4_N1.fprg
Normal file
38
MG4_N1.fprg
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0"?>
|
||||
<flowgorithm fileversion="4.2">
|
||||
<attributes>
|
||||
<attribute name="name" value="JumlahLoopN"/>
|
||||
<attribute name="authors" value="yuvlian"/>
|
||||
<attribute name="about" value=""/>
|
||||
<attribute name="saved" value="2026-03-05 09:25:57 AM"/>
|
||||
<attribute name="created" value="eXV2bGlhbjtDT1NNT1M7MjAyNi0wMy0wNTswODoxNzozMCBBTTsyNTEw"/>
|
||||
<attribute name="edited" value="eXV2bGlhbjtDT1NNT1M7MjAyNi0wMy0wNTswOToxMzozNSBBTTsxO3l1dmxpYW47Q09TTU9TOzIwMjYtMDMtMDU7MDg6NTQ6MTggQU07NTE5Ng=="/>
|
||||
<attribute name="edited" value="eXV2bGlhbjtDT1NNT1M7MjAyNi0wMy0wNTswOToyNTo1NyBBTTs2OzI2MzI="/>
|
||||
</attributes>
|
||||
<function name="Main" type="None" variable="">
|
||||
<parameters/>
|
||||
<body>
|
||||
<declare name="N, i, jumlah, jumlahTemp" type="Integer" array="False" size=""/>
|
||||
<declare name="gitudeh, yaudah" type="String" array="False" size=""/>
|
||||
<input variable="N"/>
|
||||
<assign variable="jumlah" expression="0"/>
|
||||
<assign variable="gitudeh" expression=""Jika n = " & ToString(N) & ", maka deret: ""/>
|
||||
<assign variable="yaudah" expression=""""/>
|
||||
<for variable="i" start="1" end="N" direction="inc" step="1">
|
||||
<assign variable="jumlahTemp" expression="i * (i + 1)"/>
|
||||
<assign variable="yaudah" expression="yaudah & ToString(jumlahTemp) & " + ""/>
|
||||
<assign variable="jumlah" expression="jumlah + jumlahTemp"/>
|
||||
<assign variable="gitudeh" expression="gitudeh & "(" & ToString(i) & "*" & ToString(i + 1) & ")""/>
|
||||
<if expression="i == N">
|
||||
<then>
|
||||
<assign variable="gitudeh" expression="gitudeh & " = " & yaudah & " = " & jumlah"/>
|
||||
</then>
|
||||
<else>
|
||||
<assign variable="gitudeh" expression="gitudeh & " + ""/>
|
||||
</else>
|
||||
</if>
|
||||
</for>
|
||||
<output expression="gitudeh" newline="True"/>
|
||||
</body>
|
||||
</function>
|
||||
</flowgorithm>
|
||||
Reference in New Issue
Block a user