{"id":235,"date":"2017-10-20T23:39:36","date_gmt":"2017-10-20T20:39:36","guid":{"rendered":"https:\/\/www.bilisimkurdu.cf\/?p=235"},"modified":"2017-10-20T23:39:36","modified_gmt":"2017-10-20T20:39:36","slug":"genel-programlama-mantigi-1","status":"publish","type":"post","link":"http:\/\/localhost\/bilisimkurdu\/genel-programlama-mantigi-1\/","title":{"rendered":"Genel Programlama Mant\u0131\u011f\u0131 – 1"},"content":{"rendered":"

Merhaba Arkada\u015flar, bu yaz\u0131mda programlama mant\u0131\u011f\u0131n\u0131 anlatmaya \u00e7al\u0131\u015faca\u011f\u0131m.<\/p>\n

Programlamada \u00f6nce algoritmay\u0131 bilmek gerekmektedir. Algoritmay\u0131, belli bir problemi \u00e7\u00f6z\u00fcme kavu\u015fturmak amac\u0131yla tasarlanan yol olarak belirtebiliriz.<\/p>\n

Programlama dillerini algoritmay\u0131 bilgisayar\u0131n anlayacak \u015fekilde standartlar\u015fm\u0131\u015f notasyon olarak belirtebiliriz.<\/p>\n

Algoritma Ba\u015fla komutuyla ba\u015flar Bitir komutyla biter.<\/p>\n

<\/p>\n

\u00d6rnekler verirsek;<\/p>\n

A1 : Ba\u015fla.<\/p>\n

A2 : “Merhaba D\u00fcnya” yazd\u0131r.<\/p>\n

A3 : Bitir.<\/p><\/blockquote>\n

Bahsetti\u011fimiz gibi algoritma Ba\u015fla komutuyla ba\u015flar Bitir komutyla biter.<\/p>\n

Bir veri yazd\u0131r\u0131ken \u00e7ift t\u0131rnak i\u00e7inde metin yazd\u0131r\u0131l\u0131r.<\/p>\n

Ama sistemde i\u015flem gerekip o i\u015flem sonucunun yazd\u0131rmas\u0131 i\u00e7in de\u011fi\u015fken atanmas\u0131 gerekmektedir.<\/p>\n

A1 : Ba\u015fla.<\/p>\n

A2 : a de\u011fi\u015fkenini ata<\/p>\n

A3 : a de\u011fi\u015fkenine 5 de\u011ferini ver.<\/p>\n

A4: a de\u011fi\u015fkenini yazd\u0131r.<\/p>\n

A5 : Bitir.<\/p><\/blockquote>\n

 <\/p>\n

De\u011fi\u015fken ile i\u015flem yap\u0131l\u0131rken \u00f6nce de\u011fi\u015fken atan\u0131r sonra de\u011fer verilir. Ama de\u011fi\u015fken atan\u0131rken de\u011fer verilebilir.<\/p>\n

A1 : Ba\u015fla.<\/p>\n

A2 : a de\u011fi\u015fkenini atay\u0131p 5 de\u011ferini ver.<\/p>\n

A3: a de\u011fi\u015fkenini yazd\u0131r.<\/p>\n

A4 : Bitir.<\/p><\/blockquote>\n

\u0130llaki atanan de\u011fi\u015fken yazd\u0131rmak zorunda de\u011filiz. Ama gerekti\u011fi durumda yazd\u0131rmam\u0131z gerekir.<\/p>\n

Programlamada i\u015flemler:<\/p>\n

Toplama : +<\/p>\n

\u00c7\u0131karma : –<\/p>\n

\u00c7arpma : *<\/p>\n

B\u00f6lme : \/<\/p>\n

Mod (Kalan) : %<\/p><\/blockquote>\n

\u0130\u015flem \u00f6ncelikleri:<\/p>\n

Parantez ()<\/p>\n

\u00c7arpma veya b\u00f6lme * \/<\/p>\n

Toplama veya \u00c7\u0131karma + –<\/p><\/blockquote>\n

\u0130\u015flemlerden algoritma \u00f6rnekleri :<\/p>\n

Toplama :<\/strong><\/p>\n

A1 : Ba\u015fla.<\/p>\n

A2: x de\u011fi\u015fkenini ata ve 6 de\u011ferini ver.<\/p>\n

A3 : y de\u011fi\u015fkenini ata ve 2 de\u011ferini ver.<\/p>\n

A4 z de\u011fi\u015fkenini ata ve x+y de\u011ferini ver.<\/p>\n

(veya A4 :z de\u011fi\u015fkenini ata.<\/p>\n

A5 : z=x+y i\u015flemini yap. algoritmas\u0131n\u0131 uygulayabiliriz. )<\/p>\n

A5 : z de\u011fi\u015fkenini yazd\u0131r.<\/p>\n

A6 : Bitir.<\/p><\/blockquote>\n

\u00c7\u0131karma :<\/strong><\/p>\n

A1 : Ba\u015fla.<\/p>\n

A2: x de\u011fi\u015fkenini ata ve 6 de\u011ferini ver.<\/p>\n

A3 : y de\u011fi\u015fkenini ata ve 2 de\u011ferini ver.<\/p>\n

A4 z de\u011fi\u015fkenini ata ve x-y de\u011ferini ver.<\/p>\n

(veya A4 :z de\u011fi\u015fkenini ata.<\/p>\n

A5 : z=x-y i\u015flemini yap. algoritmas\u0131n\u0131 uygulayabiliriz. )<\/p>\n

A5 : z de\u011fi\u015fkenini yazd\u0131r.<\/p>\n

A6 : Bitir.<\/p><\/blockquote>\n

\u00c7arpma :<\/strong><\/p>\n

A1 : Ba\u015fla.<\/p>\n

A2: x de\u011fi\u015fkenini ata ve 6 de\u011ferini ver.<\/p>\n

A3 : y de\u011fi\u015fkenini ata ve 2 de\u011ferini ver.<\/p>\n

A4 z de\u011fi\u015fkenini ata ve x*y de\u011ferini ver.<\/p>\n

(veya A4 :z de\u011fi\u015fkenini ata.<\/p>\n

A5 : z=x*y i\u015flemini yap. algoritmas\u0131n\u0131 uygulayabiliriz. )<\/p>\n

A5 : z de\u011fi\u015fkenini yazd\u0131r.<\/p>\n

A6 : Bitir.<\/p><\/blockquote>\n

B\u00f6lme :<\/strong><\/p>\n

A1 : Ba\u015fla.<\/p>\n

A2: x de\u011fi\u015fkenini ata ve 6 de\u011ferini ver.<\/p>\n

A3 : y de\u011fi\u015fkenini ata ve 2 de\u011ferini ver.<\/p>\n

A4 z de\u011fi\u015fkenini ata ve x\/y de\u011ferini ver.<\/p>\n

(veya A4 :z de\u011fi\u015fkenini ata.<\/p>\n

A5 : z=x\/y i\u015flemini yap. algoritmas\u0131n\u0131 uygulayabiliriz. )<\/p>\n

A5 : z de\u011fi\u015fkenini yazd\u0131r.<\/p>\n

A6 : Bitir.<\/p><\/blockquote>\n

Mod :<\/strong><\/p>\n

A1 : Ba\u015fla.<\/p>\n

A2: x de\u011fi\u015fkenini ata ve 6 de\u011ferini ver.<\/p>\n

A3 : y de\u011fi\u015fkenini ata ve 2 de\u011ferini ver.<\/p>\n

A4 z de\u011fi\u015fkenini ata ve x%y de\u011ferini ver.<\/p>\n

(veya A4 :z de\u011fi\u015fkenini ata.<\/p>\n

A5 : z=x%y i\u015flemini yap. algoritmas\u0131n\u0131 uygulayabiliriz. )<\/p>\n

A5 : z de\u011fi\u015fkenini yazd\u0131r.<\/p>\n

A6 : Bitir.<\/p><\/blockquote>\n

Bazen de\u011fi\u015fkenlerle matematiksel i\u015flem de\u011filde kar\u015f\u0131la\u015ft\u0131rmak gerekmekte. Algoritma mant\u0131\u011f\u0131nda ise,<\/p>\n

E\u011fer<\/strong> <\/em>\u015fu do\u011fru ise<\/em><\/strong><\/p>\n

Belirtilen\u00a0i\u015flemi yap.<\/strong><\/em><\/p>\n

E\u011fer<\/strong> <\/em>\u015fu yanl\u0131\u015f ise<\/strong><\/em><\/p>\n

Belirtilen\u00a0i\u015flemi yap.<\/strong><\/em><\/p>\n

Ve iki veya ikiden fazla de\u011feri kar\u015f\u0131la\u015ft\u0131rmak gerekmektedir.<\/p>\n

K\u00fc\u00e7\u00fckt\u00fcr : <<\/p>\n

B\u00fcy\u00fckt\u00fcr : ><\/p>\n

K\u00fc\u00e7\u00fcke\u015fittir : <=<\/p>\n

B\u00fcy\u00fcke\u015fittir : >=<\/p>\n

E\u015fittir : ==<\/p>\n

De\u011fi\u015fken Atama : =<\/p><\/blockquote>\n

Not : A\u015fa\u011f\u0131daki mant\u0131k y\u00fcr\u00fctmeyle B\u00fcy\u00fcke\u015fittir ile K\u00fc\u00e7\u00fcke\u015fittir i\u015faretlerini anlatmaya \u00e7al\u0131\u015fm\u0131\u015f\u0131md\u0131r.<\/p>\n

K\u00fc\u00e7\u00fck : < E\u015fittir : == K\u00fc\u00e7\u00fck e\u015fittir : <=<\/p>\n

B\u00fcy\u00fck > E\u015fittir : == B\u00fcy\u00fcke\u015fittir : >=<\/p><\/blockquote>\n

Birka\u00e7 \u00f6rnekle anlatay\u0131m;<\/p>\n

A1 : Ba\u015fla.<\/p>\n

A2: x de\u011fi\u015fkenini ata ve 6 de\u011ferini ver.<\/p>\n

A3 : y de\u011fi\u015fkenini ata ve 2 de\u011ferini ver.<\/p>\n

A4 E\u011fer x<y ise<\/p>\n

A5 : “x k\u00fc\u00e7\u00fckt\u00fcr.” yazd\u0131r.<\/p>\n

A5 :E\u011fer tam tersiyle<\/p>\n

A6 : “y k\u00fc\u00e7\u00fckt\u00fcr.” yazd\u0131r.<\/p>\n

A7 : Bitir.<\/p><\/blockquote>\n

E\u011fer di\u011fer i\u015faretlerle de yapmak istiyorsan\u0131z A4’te a\u015fa\u011f\u0131daki de\u011ferler gelmelidir.<\/p>\n

E\u015fittir i\u00e7in;<\/p>\n

A4 : E\u011fer x==y ise<\/p><\/blockquote>\n

B\u00fcy\u00fckt\u00fcr i\u00e7in;<\/p>\n

A4 : E\u011fer x>y ise<\/p><\/blockquote>\n

B\u00fcy\u00fcke\u015fittir i\u00e7in;<\/p>\n

A4 : E\u011fer x>=y ise<\/p><\/blockquote>\n

K\u00fc\u00e7\u00fck e\u015fittir i\u00e7in;<\/p>\n

A4 : E\u011fer x<=y ise<\/p><\/blockquote>\n

Bazen komutlar\u0131 belli bir d\u00f6ng\u00fcye g\u00f6re \u00e7al\u0131\u015ft\u0131rmak isteyebiliriz. D\u00f6ng\u00fcde algoritma mant\u0131\u011f\u0131 \u015fu \u015fekilde;<\/p>\n

D\u00d6NG\u00dc ba\u015flang\u0131\u00e7 …… biti\u015f +art\u0131\u015f miktar\u0131<\/p>\n

Ba\u015flang\u0131\u00e7’tan biti\u015f’e kadar art\u0131\u015f miktar\u0131’na g\u00f6re komut’u uygula<\/p><\/blockquote>\n

Bir \u00f6rnekle anlat\u0131rsak;<\/p>\n

A1 : Ba\u015fla.<\/p>\n

A2: x de\u011fi\u015fkenini ata ve 0 de\u011ferini ver.<\/p>\n

A3 : x’i 0’dan 10’a kadar 1’e art\u0131\u015fla x’i 1 artt\u0131r.<\/p>\n

A4 x’i yazd\u0131r.<\/p>\n

A5 : Bitir.<\/p><\/blockquote>\n

Bazen verileri klavyeden almak isteyebiliriz.<\/p>\n

A1 : Ba\u015fla.<\/p>\n

A2: x de\u011fi\u015fkenini ata ve 0 de\u011ferini ver.<\/p>\n

A3 : Klavyeden veri al ve al\u0131nan veriyi x’e ata.<\/p>\n

A4 x’i yazd\u0131r.<\/p>\n

A5 : Bitir.<\/p><\/blockquote>\n

Ve b\u00f6ylece algoritmay\u0131 tan\u0131mlay\u0131p klavyemizin d\u00f6nd\u00fc\u011f\u00fcnce anlatmaya \u00e7al\u0131\u015ft\u0131m.<\/p>\n

K\u0131smetse di\u011fer yaz\u0131mda konuyu devam ettirmenin arzusunday\u0131m.<\/p>\n","protected":false},"excerpt":{"rendered":"

Merhaba Arkada\u015flar, bu yaz\u0131mda programlama mant\u0131\u011f\u0131n\u0131 anlatmaya \u00e7al\u0131\u015faca\u011f\u0131m. Programlamada \u00f6nce algoritmay\u0131 bilmek gerekmektedir. Algoritmay\u0131, belli bir problemi \u00e7\u00f6z\u00fcme kavu\u015fturmak amac\u0131yla tasarlanan yol olarak belirtebiliriz. Programlama dillerini algoritmay\u0131 bilgisayar\u0131n anlayacak \u015fekilde standartlar\u015fm\u0131\u015f notasyon olarak belirtebiliriz. Algoritma Ba\u015fla komutuyla ba\u015flar Bitir komutyla biter.<\/p>\n","protected":false},"author":3,"featured_media":244,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[84],"tags":[180,266,300,326,327,610],"_links":{"self":[{"href":"http:\/\/localhost\/bilisimkurdu\/wp-json\/wp\/v2\/posts\/235"}],"collection":[{"href":"http:\/\/localhost\/bilisimkurdu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/localhost\/bilisimkurdu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/localhost\/bilisimkurdu\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/localhost\/bilisimkurdu\/wp-json\/wp\/v2\/comments?post=235"}],"version-history":[{"count":0,"href":"http:\/\/localhost\/bilisimkurdu\/wp-json\/wp\/v2\/posts\/235\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/localhost\/bilisimkurdu\/wp-json\/wp\/v2\/media\/244"}],"wp:attachment":[{"href":"http:\/\/localhost\/bilisimkurdu\/wp-json\/wp\/v2\/media?parent=235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/localhost\/bilisimkurdu\/wp-json\/wp\/v2\/categories?post=235"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/localhost\/bilisimkurdu\/wp-json\/wp\/v2\/tags?post=235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}