<?xml version="1.0" encoding="iso-8859-9" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Clomosy | Forum : Asal sayı bulma</title>
  <link>https://forum.clomosy.com.tr/</link>
  <description><![CDATA[XML içerik linki; Clomosy | Forum : TclForm Olu&#351;turma : Asal sayı bulma]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 01 May 2026 19:22:55 +0000</pubDate>
  <lastBuildDate>Mon, 17 Nov 2025 17:41:04 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.07</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forum.clomosy.com.tr/RSS_post_feed.asp?TID=1229</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Clomosy | Forum]]></title>
   <url>https://forum.clomosy.com.tr/forum_images/logo.png</url>
   <link>https://forum.clomosy.com.tr/</link>
  </image>
  <item>
   <title><![CDATA[Asal sayı bulma : Merhaba Alper,Senin yazd&#305;&#287;&#305;n kod...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=1229&amp;PID=2707#2707</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=257">Emr.Erkmn</a><br /><strong>Konu:</strong> 1229<br /><strong>Gönderim Zamanı:</strong> 17&nbsp;Kasım&nbsp;2025 Saat 17:41<br /><br />Merhaba Alper,&nbsp;<br>Senin yazdığın kod için div yerine modu kullanmalıyız. Div operatörü bölme işleminin sonucunu verir. Asal sayı kontrolü için kalanı bulmak gerekir bunun için mod operatörünü kullanalım.&nbsp;<br>Ayrıca yazılan if bloğun da ( sayi1 div 3==0) ifadesinde sayı 3 ise, 3'e bölümünden kalan 0'dır.&nbsp;<br>Kod çıktısında da asal değil olarak işaretler ama asal sayılar kendilerine bölünebilirler.&nbsp;<br>seni sorun için 1'den 100'e kadar bu şekil de&nbsp;<br>//////////////////<div><div>var</div><div>&nbsp; i, j, AsalMi : Integer;</div><div>&nbsp; TumAsallar : String;</div><div>{</div><div>&nbsp; TumAsallar = '';</div><div><br></div><div>&nbsp; // 1'den 100'e kadar olan sayıları tek tek gez</div><div>&nbsp; for (i = 1 to 100)</div><div>&nbsp; {</div><div>&nbsp; &nbsp; AsalMi = 1; // Başlangıçta sayıyı asal varsayalım&nbsp;</div><div><br></div><div>&nbsp; &nbsp; // 1 ve 1'den küçük sayılar asal değildir</div><div>&nbsp; &nbsp; if (i &lt;= 1)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; AsalMi = 0;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; else</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; // 2'den başlayıp sayının kendisine kadar (kendisi hariç) bölen var mı bak</div><div>&nbsp; &nbsp; &nbsp; for (j = 2 to i - 1)</div><div>&nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (i Mod j == 0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AsalMi = 0; // Tam bölen bulundu, demek ki asal değil</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Break; // Döngüden çık, daha fazla aramaya gerek yok</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; }</div><div><br></div><div>&nbsp; &nbsp; // Eğer AsalMi hala 1 ise, sayı asaldır listeye ekle</div><div>&nbsp; &nbsp; if (AsalMi == 1)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; TumAsallar = TumAsallar + IntToStr(i) + ' ';</div><div>&nbsp; &nbsp; }</div><div>&nbsp; }</div><div><br></div><div>&nbsp; ShowMessage('1-100 Arası Asal Sayılar: ' + TumAsallar);</div><div>}<br>////////////////////////////////////////////////<br><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">var&nbsp;</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">i , sayi : Integer;</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">AsalMi : Boolean;</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;"><br _ng-ng-c3653114936="" ="ng-star-inserted"></p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">{</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">&nbsp; sayi = 26;</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">&nbsp; AsalMi = True;</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">&nbsp;&nbsp;</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">&nbsp;&nbsp;</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">&nbsp; for ( i = 2 to (sayi div 2))</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">&nbsp; {</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">&nbsp; &nbsp; if (sayi mod i ==0)</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">&nbsp; &nbsp; AsalMi=False</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">&nbsp; }</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">&nbsp; if AsalMi&nbsp;</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">&nbsp; ShowMessage(IntToStr(sayi)+ ' asal sayıdır');</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">&nbsp; else&nbsp;</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">&nbsp; ShowMessage(IntToStr(sayi)+ ' asal sayı değildir' );</p><p _ng-ng-c3653114936="" ="query-text-line ng-star-inserted" style="margin: 0px; color: rgb255, 255, 255; font-family: &quot;Google Sans Flex&quot;, &quot;Google Sans&quot;, &quot;Helvetica Neue&quot;, sans-serif; font-size: 16px; font-variant-ligatures: n&#111;ne; : rgb51, 53, 55;">}&nbsp;</p><br>Div operatörünü kullanarak yapmak istersek eğer,<br>div'i mod alma yani kalan için değil döngünün döneceğini hesaplamak için kullanıldı.<br>matematiksel olarak bir sayının yarısından daha büyük bir tam böleni olamaz, kendisi hariç.&nbsp;<br>mesela sayı ise 26 div 2= 13 eder<br>yine mod operatörünü asalı kontrol de kullanıyoruz.&nbsp;<br><br><br><br></div><br><a href="https://static.cloudflareinsights.com/beac&#111;n.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" target="_blank" rel="nofollow">https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015"</a> integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{&quot;version&quot;:&quot;2024.11.0&quot;,&quot;token&quot;:&quot;439455f3e46c40b98dbd42a2f1a954d8&quot;,&quot;r&quot;:1,&quot;server_timing&quot;:{&quot;name&quot;:{&quot;cfCacheStatus&quot;:true,&quot;cfEdge&quot;:true,&quot;cfExtPri&quot;:true,&quot;cfL4&quot;:true,&quot;cfOrigin&quot;:true,&quot;cfSpeedBrain&quot;:true},&quot;location_startswith&quot;:null}}" crossorigin="anonymous"></div>]]>
   </description>
   <pubDate>Mon, 17 Nov 2025 17:41:04 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=1229&amp;PID=2707#2707</guid>
  </item> 
  <item>
   <title><![CDATA[Asal sayı bulma : 1&amp;#039;den 100&amp;#039;e kadar olan...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=1229&amp;PID=2704#2704</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=351">Alper</a><br /><strong>Konu:</strong> 1229<br /><strong>Gönderim Zamanı:</strong> 17&nbsp;Kasım&nbsp;2025 Saat 14:13<br /><br /><div>1'den 100'e kadar olan asal sayıları bulmak için yazdığım kodda 2,3,5 ve 7'yi asal değil olarak kabul ediyor.Bu sorunu nasıl düzeltebilirim?</div><div><br></div><div>var</div><div>sayi1 : Integer</div><div>{</div><div>&nbsp; sayi1 = 3</div><div>&nbsp; if((((sayi1 div 2==0)||(sayi1 div 3==0)||(sayi1 div 5==0)||(sayi1 div 7==0))))</div><div>&nbsp; ShowMessage('Asal Değil')</div><div>&nbsp; else if (sayi1 ==1)</div><div>&nbsp; ShowMessage('Asal Değil')</div><div>&nbsp; else if ((((sayi1 div 7==1)||(sayi1 div 5==1)||(sayi1 div 3==1)||(sayi1 div 2==1))))</div><div>&nbsp;ShowMessage('Asal')</div><div>&nbsp; else</div><div>&nbsp; ShowMessage('Asal')</div><div>&nbsp;}</div><div>&nbsp;</div><a href="https://static.cloudflareinsights.com/beac&#111;n.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" target="_blank" rel="nofollow">https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015"</a> integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{&quot;version&quot;:&quot;2024.11.0&quot;,&quot;token&quot;:&quot;439455f3e46c40b98dbd42a2f1a954d8&quot;,&quot;r&quot;:1,&quot;server_timing&quot;:{&quot;name&quot;:{&quot;cfCacheStatus&quot;:true,&quot;cfEdge&quot;:true,&quot;cfExtPri&quot;:true,&quot;cfL4&quot;:true,&quot;cfOrigin&quot;:true,&quot;cfSpeedBrain&quot;:true},&quot;location_startswith&quot;:null}}" crossorigin="anonymous">]]>
   </description>
   <pubDate>Mon, 17 Nov 2025 14:13:42 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=1229&amp;PID=2704#2704</guid>
  </item> 
 </channel>
</rss>