Created
March 19, 2014 22:53
-
-
Save emreyh/9653119 to your computer and use it in GitHub Desktop.
Oyuncak Makine Ornekler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
basla get | |
ifzero duyur | |
add toplam | |
store toplam | |
load bolen | |
add 1 | |
store bolen | |
goto basla | |
duyur load toplam | |
div bolen | |
stop | |
toplam 0 | |
bolen 0 | |
#ortalama bulan program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start get | |
ifzero result | |
store val1 | |
sub val2 | |
ifpos L # saglanıyorsa L satirina git | |
goto start # eger "ifpos" sartı saglanmıyorsa bir sey yapma basa don | |
L load val1 | |
store val2 | |
goto start | |
result load val2 | |
stop | |
val1 0 | |
val2 0 | |
#en buyuk sayıyı bulan program |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load 2 # 2 yi hesaplamaya gerek yok 3 ten baslayalım.. | |
start load val | |
mod range | |
ifzero L | |
load range | |
add 1 # range 1 ekle | |
store range | |
goto start | |
L load val | |
sub range | |
ifzero M | |
continue load val | |
add 1 # val 1 ekle | |
store val | |
sub sayi | |
ifzero end | |
load 2 | |
store range | |
goto start | |
M load val | |
goto continue | |
end stop | |
val 3 # 50 ye kadar gidecek olan sayi | |
range 2 # tek tek artacak ve mod alınacak sayı | |
sayi 50 # bu sabit program içinde kontrol için gerekli | |
#1 ile 50 arasında asal sayıları bulan program | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment