-
Notifications
You must be signed in to change notification settings - Fork 0
/
56-Binom Programı.fprg
40 lines (40 loc) · 2.05 KB
/
56-Binom Programı.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
<?xml version="1.0"?>
<flowgorithm fileversion="3.0">
<attributes>
<attribute name="name" value=""/>
<attribute name="authors" value="husey"/>
<attribute name="about" value=""/>
<attribute name="saved" value="2023-09-21 08:33:25 ÖS"/>
<attribute name="created" value="aHVzZXk7SMWhU0VZSU47MjAyMy0wOS0yMTswNjozMjozMiDDllM7Mjc5NA=="/>
<attribute name="edited" value="aHVzZXk7SMWhU0VZSU47MjAyMy0wOS0yMTswODozMzoyNSDDllM7MjsyOTA4"/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<declare name="kat, i, j, k" type="Integer" array="False" size=""/>
<output expression=""Lütfen kaç katlı binom oluşturmak istediğinizi yazınız: "" newline="True"/>
<input variable="kat"/>
<declare name="ustKat" type="Integer" array="True" size="kat + 1"/>
<declare name="altKat" type="Integer" array="True" size="kat + 1"/>
<assign variable="ustKat[0]" expression="1"/>
<for variable="i" start="0" end="kat" direction="inc" step="1">
<for variable="j" start="0" end="i" direction="inc" step="1">
<if expression="i == j || j == 0">
<then>
<assign variable="altKat[j]" expression="1"/>
</then>
<else>
<assign variable="altKat[j]" expression="ustKat[j] + ustKat[j - 1]"/>
</else>
</if>
</for>
<for variable="k" start="0" end="i" direction="inc" step="1">
<assign variable="ustKat[k]" expression="altKat[k]"/>
<assign variable="altKat[k]" expression="0"/>
<output expression="ustKat[k] & " "" newline="False"/>
</for>
<output expression="" "" newline="True"/>
</for>
</body>
</function>
</flowgorithm>