KintaRo Posted December 8, 2011 Share Posted December 8, 2011 Simpson_Bart arkadaşımızın autoit le hazırladığı projeden esinlenerek AMS ile bir çalışma hazırladım. Küçük bir fonksiyonla 1'den 49'a kadar random sayılar üretip, sayıları tabloya yerleştiriyor, sıralıyor ve for döngüsü ile inputlara yazıyor. [codebox]tSayi = {}; function sayiBul() tSayi = {}; for i=1,6 do Table.Insert(tSayi, Table.Count(tSayi)+1, Math.Random(1, 49)) end Table.Sort(tSayi, nil) end[/codebox] [img]http://i.imgur.com/7XArH.png[/img] Proje Dosyası: [code]http://www.mediafire.com/?ts3xyx7o3f2iovn[/code] Executable: [code]http://www.mediafire.com/?yj07j68xsx67bjh[/code] Quote Link to comment Share on other sites More sharing options...
pilgetir Posted December 8, 2011 Share Posted December 8, 2011 bu çalışman ile rastgele kazanırsa birisi patlar bu çalışma o zaman Quote Link to comment Share on other sites More sharing options...
neccooy Posted December 8, 2011 Share Posted December 8, 2011 Bazen rakamlar aynı olabiliyor Quote Link to comment Share on other sites More sharing options...
Cyph3r Posted December 8, 2011 Share Posted December 8, 2011 [quote name='neccooy' date='08 December 2011 - 19:17 ' timestamp='1323364657' post='1125708'] Bazen rakamlar aynı olabiliyor [/quote] Aynı çıkıyorsa o sayıyı kesin yaz usta. Belliki ona çıkacak, program ısrarcı Quote Link to comment Share on other sites More sharing options...
blackman12 Posted December 8, 2011 Share Posted December 8, 2011 (edited) Aynı sayılar gelmez: [code]tSayi = {0,0,0,0,0,0}; function sayiBul() for i=1,6 do tSayi[i] = Math.Random(1, 49) end t = 1 while (t < 6) do for i=1,6 do for j=1,6 do if (i ~= j) and (tSayi[i] == tSayi[j]) then tSayi[i] = Math.Random(1, 49) end end end t = t + 1 end Table.Sort(tSayi, nil) end [/code] Edited December 8, 2011 by MostWanted Quote Link to comment Share on other sites More sharing options...
m3hm3t1991 Posted December 8, 2011 Share Posted December 8, 2011 (edited) [quote name='blackman12' date='08 December 2011 - 22:11 ' timestamp='1323375064' post='1125830'] Aynı sayılar gelmez: [code]tSayi = {0,0,0,0,0,0}; function sayiBul() for i=1,6 do tSayi[i] = Math.Random(1, 49) end t = 1 while (t < 6) do for i=1,6 do for j=1,6 do if (i ~= j) and (tSayi[i] == tSayi[j]) then tSayi[i] = Math.Random(1, 49) end end end t = t + 1 end Table.Sort(tSayi, nil) end [/code] [/quote] hata verdi bi bakı ver http://www.hhresim.com/pictures/bdf1b7dfec485190f55ac674009cbd7e.png Edited December 8, 2011 by m3hm3t1991 Quote Link to comment Share on other sites More sharing options...
NotToday Posted December 8, 2011 Share Posted December 8, 2011 Resim çok mu küçük problem bende mi? Quote Link to comment Share on other sites More sharing options...
abdullahTR Posted December 8, 2011 Share Posted December 8, 2011 [quote name='ReaLyMaN' date='08 December 2011 - 22:53 ' timestamp='1323377598' post='1125867'] Resim çok mu küçük problem bende mi? [/quote] sende sorun kanka Quote Link to comment Share on other sites More sharing options...
NotToday Posted December 8, 2011 Share Posted December 8, 2011 Resmi değiştirmiş kanka.Aradaşım bu ams kodu autoit değil. Quote Link to comment Share on other sites More sharing options...
Yusuf-Yildiz Posted December 8, 2011 Share Posted December 8, 2011 [quote name='abdullahTR' date='08 December 2011 - 23:31 ' timestamp='1323379912' post='1125887'] sende sorun kanka [/quote] [b]Arkadaş sonradan düzeltti...[/b] Quote Link to comment Share on other sites More sharing options...
m3hm3t1991 Posted December 8, 2011 Share Posted December 8, 2011 [quote name='ReaLyMaN' date='08 December 2011 - 23:35 ' timestamp='1323380115' post='1125891'] Resmi değiştirmiş kanka.Aradaşım bu ams kodu autoit değil. [/quote] tamam kardeş eyvallah Quote Link to comment Share on other sites More sharing options...
KintaRo Posted December 12, 2011 Author Share Posted December 12, 2011 Aynı sayı veriyor/verebilir farkındaysanız burası örnek projeler bölümü. Geliştirmek size kalmış. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.