-
Notifications
You must be signed in to change notification settings - Fork 0
/
21-Girilen Sayının Asal Olup Olmadığını Söyleyen Program.fprg
36 lines (36 loc) · 1.7 KB
/
21-Girilen Sayının Asal Olup Olmadığını Söyleyen 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-19 01:17:26 ÖS"/>
<attribute name="created" value="aHVzZXk7SMWhU0VZSU47MjAyMy0wOC0xOTswMToxMzo0MCDDllM7Mjc5Mw=="/>
<attribute name="edited" value="aHVzZXk7SMWhU0VZSU47MjAyMy0wOC0xOTswMToxNzoyNiDDllM7MTsyOTA5"/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<declare name="sayi, asalDurumKontrol, sayac" type="Integer" array="False" size=""/>
<assign variable="asalDurumKontrol" expression="0"/>
<output expression=""Lütfen asallık durumunu öğrenmek istediğiniz sayıyı giriniz."" newline="True"/>
<input variable="sayi"/>
<for variable="sayac" start="2" end="sayi/2" direction="inc" step="1">
<if expression="sayi % sayac == 0">
<then>
<assign variable="asalDurumKontrol" expression="1"/>
</then>
<else/>
</if>
</for>
<if expression="asalDurumKontrol == 1">
<then>
<output expression=""Girmiş olduğunuz sayı asal değildir."" newline="True"/>
</then>
<else>
<output expression=""Girmiş olduğunuz sayı asaldır."" newline="True"/>
</else>
</if>
</body>
</function>
</flowgorithm>