-
Notifications
You must be signed in to change notification settings - Fork 0
/
13-Mükemmel Sayı Bulma Programı.fprg
36 lines (36 loc) · 1.71 KB
/
13-Mükemmel Sayı Bulma 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
<?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-08-15 11:45:23 ÖS"/>
<attribute name="created" value="aHVzZXk7SMWhU0VZSU47MjAyMy0wOC0xNTsxMTo0MDo0NSDDllM7Mjc5NQ=="/>
<attribute name="edited" value="aHVzZXk7SMWhU0VZSU47MjAyMy0wOC0xNTsxMTo0NToyMyDDllM7MTsyOTA0"/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<declare name="sayi, carpanToplam, sayac" type="Integer" array="False" size=""/>
<assign variable="carpanToplam" expression="0"/>
<output expression=""Lütfen bir sayı giriniz."" newline="True"/>
<input variable="sayi"/>
<for variable="sayac" start="1" end="sayi / 2" direction="inc" step="1">
<if expression="sayi % sayac == 0">
<then>
<assign variable="carpanToplam" expression="carpanToplam + sayac"/>
</then>
<else/>
</if>
</for>
<if expression="carpanToplam == sayi">
<then>
<output expression=""Tebrikler girmiş olduğunuz sayı bir mükemmel sayıdır."" newline="True"/>
</then>
<else>
<output expression=""Maalesef girmiş olduğunuz sayı bir mükemmel sayı değildir."" newline="True"/>
</else>
</if>
</body>
</function>
</flowgorithm>