-
Notifications
You must be signed in to change notification settings - Fork 0
/
38-Fonksiyonlar İle Faktoriyel Hesaplama Uygulaması.fprg
36 lines (36 loc) · 1.78 KB
/
38-Fonksiyonlar İle Faktoriyel Hesaplama Uygulaması.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
<?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-06 03:02:14 ÖS"/>
<attribute name="created" value="aHVzZXk7SMWhU0VZSU47MjAyMy0wOS0wNjswMjo0NzoyMCDDllM7Mjc5Ng=="/>
<attribute name="edited" value="aHVzZXk7SMWhU0VZSU47MjAyMy0wOS0wNjswMzowMjoxNCDDllM7MjsyOTAw"/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<declare name="sayi1, sayi2" type="Integer" array="False" size=""/>
<declare name="toplam" type="Real" array="False" size=""/>
<output expression=""1. Sayıyı giriniz: "" newline="True"/>
<input variable="sayi1"/>
<output expression=""2.Sayıyı Giriniz: "" newline="True"/>
<input variable="sayi2"/>
<assign variable="toplam" expression="fakt(sayi1) / fakt(sayi2) * fakt(sayi1 - sayi2)"/>
<output expression=""Girmiş olduğunuz değerlerin faktoriyel hesaplaması: " & toplam" newline="True"/>
</body>
</function>
<function name="fakt" type="Integer" variable="fakthesap">
<parameters>
<parameter name="say1" type="Integer" array="False"/>
</parameters>
<body>
<declare name="fakthesap, i" type="Integer" array="False" size=""/>
<assign variable="fakthesap" expression="1"/>
<for variable="i" start="1" end="say1" direction="inc" step="1">
<assign variable="fakthesap" expression="fakthesap * i"/>
</for>
</body>
</function>
</flowgorithm>