-
Notifications
You must be signed in to change notification settings - Fork 0
/
26-Girilen Sayı Adedince Asal Sayı Bulan Program.fprg
40 lines (40 loc) · 2.1 KB
/
26-Girilen Sayı Adedince Asal Sayı Bulan 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-08-24 04:49:04 ÖS"/>
<attribute name="created" value="aHVzZXk7SMWhU0VZSU47MjAyMy0wOC0yNDswNDozMDo0MSDDllM7Mjc5Mg=="/>
<attribute name="edited" value="aHVzZXk7SMWhU0VZSU47MjAyMy0wOC0yNDswNDo0OTowNCDDllM7MTsyOTA5"/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<declare name="istenenAsalSayi, bulunanAsalSayi, kontrolAsalSayi, asalKontrol, sayac" type="Integer" array="False" size=""/>
<output expression=""Lütfen kaç adet asal sayı görmek istediğinizi yazınız."" newline="True"/>
<input variable="istenenAsalSayi"/>
<assign variable="kontrolAsalSayi" expression="2"/>
<assign variable="bulunanAsalSayi" expression="0"/>
<while expression="istenenAsalSayi > bulunanAsalSayi">
<assign variable="asalKontrol" expression="0"/>
<for variable="sayac" start="2" end="kontrolAsalSayi / 2" direction="inc" step="1">
<if expression="kontrolAsalSayi % sayac == 0">
<then>
<assign variable="asalKontrol" expression="1"/>
</then>
<else/>
</if>
</for>
<if expression="asalKontrol == 0">
<then>
<assign variable="bulunanAsalSayi" expression="bulunanAsalSayi + 1"/>
<output expression=""Girdiğiniz Sayı Adedince Asal Sayılarınız: " & kontrolAsalSayi" newline="True"/>
</then>
<else/>
</if>
<assign variable="kontrolAsalSayi" expression="kontrolAsalSayi + 1"/>
</while>
</body>
</function>
</flowgorithm>