{"id":129,"date":"2023-12-02T03:09:53","date_gmt":"2023-12-02T00:09:53","guid":{"rendered":"http:\/\/www.cuneytbayrak.com\/?p=129"},"modified":"2025-02-21T00:44:20","modified_gmt":"2025-02-20T21:44:20","slug":"faktoriyel-algoritmasi-recursive-yontem","status":"publish","type":"post","link":"http:\/\/www.cuneytbayrak.com\/?p=129","title":{"rendered":"Fakt\u00f6riyel Algoritmas\u0131 (Recursive Y\u00f6ntem)"},"content":{"rendered":"<p>Daha evvel\u00a0<a href=\"http:\/\/www.cuneytbayrak.com\/?p=126\" target=\"_blank\" rel=\"noopener\">\u015fu yaz\u0131m\u0131zda<\/a>\u00a0iteratif y\u00f6ntemi denemi\u015ftik. \u015eimdi de recursive y\u00f6ntemle fakt\u00f6riyel hesab\u0131 yapmaya \u00e7al\u0131\u015fal\u0131m.<\/p>\n<p><a href=\"http:\/\/www.flowgorithm.org\/download\/index.html\" target=\"_blank\" rel=\"noopener\">Flowgorithm<\/a>\u00a0uygulamas\u0131 ile yapt\u0131\u011f\u0131m bir flowchart\u0131 a\u015fa\u011f\u0131da incelemenize sundum.<\/p>\n<p>Ayr\u0131ca program\u0131n tamam\u0131n\u0131 da\u00a0<a href=\"http:\/\/cuneytbayrak.com\/wp-content\/uploads\/2025\/02\/fakt\u00f6riyel_recursive.rar\" target=\"_blank\" rel=\"noopener\">buradan\u00a0<\/a>indirebilirsiniz.<\/p>\n<p>A\u015fa\u011f\u0131da ki python kodlar\u0131na da bakal\u0131m.<\/p>\n<p><strong>Kod Blo\u011fum:\u00a0<\/strong><\/p>\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;python&quot;,&quot;mime&quot;:&quot;text\/x-python&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:true,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">def faktoriyel(n):\r\n    if n &lt;= 1:\r\n        sonuc = 1\r\n    else:\r\n        sonuc = faktoriyel(n - 1) * n\r\n    return sonuc\r\n\r\n# Main\r\n# Bu program fakt\u00f6riyel hesab\u0131n\u0131 recursive y\u00f6ntemle hesaplar\r\nprint(\"L\u00fctfen fakt\u00f6riyelini hesaplamak istedi\u011finiz say\u0131y\u0131 giriniz:\")\r\nn = int(input())\r\n\r\nif n &lt; 0:\r\n    print(\"Negatif say\u0131lar\u0131n fakt\u00f6ryeli hesaplanamaz!\")\r\nelse:\r\n    print(f\"{n}! = {faktoriyel(n)}\")\r\n<\/pre>\n<\/div>\n<p>Kolay gele&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Daha evvel\u00a0\u015fu yaz\u0131m\u0131zda\u00a0iteratif y\u00f6ntemi denemi\u015ftik. \u015eimdi de recursive y\u00f6ntemle fakt\u00f6riyel hesab\u0131 yapmaya \u00e7al\u0131\u015fal\u0131m. Flowgorithm\u00a0uygulamas\u0131 ile yapt\u0131\u011f\u0131m bir flowchart\u0131 a\u015fa\u011f\u0131da incelemenize sundum. Ayr\u0131ca program\u0131n tamam\u0131n\u0131 da\u00a0buradan\u00a0indirebilirsiniz. A\u015fa\u011f\u0131da ki python kodlar\u0131na da&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"http:\/\/www.cuneytbayrak.com\/?p=129\">Devam\u0131n\u0131 Oku<span class=\"screen-reader-text\">Fakt\u00f6riyel Algoritmas\u0131 (Recursive Y\u00f6ntem)<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2,"footnotes":""},"categories":[2],"tags":[36],"class_list":["post-129","post","type-post","status-publish","format-standard","hentry","category-algoritmalar","tag-factorialrecursive","excerpt"],"_links":{"self":[{"href":"http:\/\/www.cuneytbayrak.com\/index.php?rest_route=\/wp\/v2\/posts\/129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.cuneytbayrak.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.cuneytbayrak.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.cuneytbayrak.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.cuneytbayrak.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=129"}],"version-history":[{"count":1,"href":"http:\/\/www.cuneytbayrak.com\/index.php?rest_route=\/wp\/v2\/posts\/129\/revisions"}],"predecessor-version":[{"id":130,"href":"http:\/\/www.cuneytbayrak.com\/index.php?rest_route=\/wp\/v2\/posts\/129\/revisions\/130"}],"wp:attachment":[{"href":"http:\/\/www.cuneytbayrak.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.cuneytbayrak.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=129"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.cuneytbayrak.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}