GokhanArilik Posted December 28, 2014 Share Posted December 28, 2014 Arkadaşlar akış şeması veya c dilinden anlayan biri varsa yardım edebilirimi bir sorum olacaktı. Quote Link to comment Share on other sites More sharing options...
Dexter18 Posted December 28, 2014 Share Posted December 28, 2014 Soru nedir? Quote Link to comment Share on other sites More sharing options...
GokhanArilik Posted December 28, 2014 Author Share Posted December 28, 2014 (edited) Tavşan ile kaplumbağa yarışmasının algoritması veya c dilinde kodu lazım. Ama bazı eklemeler var tabi. Edited December 28, 2014 by GokhanArilik Quote Link to comment Share on other sites More sharing options...
Dexter18 Posted December 28, 2014 Share Posted December 28, 2014 turtle = top2 rabbit = top34 steps_taken = 05 step_limit = 267 forever:8 if rabbit == end:9 return 'No Loop Found'10 rabbit = rabbit.next1112 steps_taken += 11314 if rabbit == turtle:15 return 'Loop found'1617 if steps_taken == step_limit:18 steps_taken = 019 step_limit *= 220 // teleport the turtle21 turtle = rabbit Quote Link to comment Share on other sites More sharing options...
GokhanArilik Posted December 28, 2014 Author Share Posted December 28, 2014 abi c dilinde olacak ama giriş seviyesinde yani. :( Quote Link to comment Share on other sites More sharing options...
Dexter18 Posted December 28, 2014 Share Posted December 28, 2014 Tamam oyunun kodları şöyle olacak: #include <stdio.h>#include <stdlib.h>char turtlefonksiyon(int);int main(int argc, char** argv) {char rbosluk1[81]=" ";char rbosluk2[81]=" ";char rbosluk3[81]=" ";char rbosluk6[81]=" ";char b[2]="r";int z=0;printf(turtlefonksiyon(z));return (EXIT_SUCCESS);}char turtlefonksiyon(int z){char a[2]="t";char tbosluk1[81]=" ";char tbosluk2[81]=" ";char tbosluk3[81]=" ";int count=0;for(count;count<15;count++){z=rand()%6+1;printf("%i",z);if (z==1){printf("%s",tbosluk1);}if (z==2){printf("%s",tbosluk2);}if (z==3){printf("%s",tbosluk3);}}printf("%s\n",a);return z;} Quote Link to comment Share on other sites More sharing options...
GokhanArilik Posted December 28, 2014 Author Share Posted December 28, 2014 Abi çok sağol yardımcı oluyonda cidden çok çok giriş seviyesindeyiz. bunu hocaya verirsem anlar. algoritmada anlarsan algortimada yardım etsen. Quote Link to comment Share on other sites More sharing options...
Dexter18 Posted December 28, 2014 Share Posted December 28, 2014 Bende üniversite 1. sınıftayken gördüm bu dersi fazla da hatırlamıyorum ama bundan basit nasıl yazarım bilemedim. Yazdığım kodlar alıntı bu arada. tavşan i, turtle j, i=j=0 ile başla. zar at. ör. tavşan için 3 geldiyse: rabbit[i]=' '; i=i+3; rabbit[i]='r'; sırayla yapacaksın bunu. ta ki i veya j'den hangisi önce 80 olursa. bu kadar Quote Link to comment Share on other sites More sharing options...
GokhanArilik Posted December 28, 2014 Author Share Posted December 28, 2014 peki algoritmada yani akış şemasında random sayı nasıl yapılıyor onu biliyon mu? Quote Link to comment Share on other sites More sharing options...
Editor MOTUN Posted December 28, 2014 Editor Share Posted December 28, 2014 Bu konu "Sohbet-Chat" forumundan "Yazılım" forumuna taşınmıştır. Quote Link to comment Share on other sites More sharing options...
Dexter18 Posted December 28, 2014 Share Posted December 28, 2014 Önce bir textbox ve button yerleştiriyorsun visual studio alanına sonra: public Random rnd = new Random(); private void button1_Click(object sender, EventArgs e) { textBox1.Text = rnd.Next().ToString(); } Quote Link to comment Share on other sites More sharing options...
GokhanArilik Posted December 28, 2014 Author Share Posted December 28, 2014 Tmm bunu biliyorum fakat akış şemasında farklı oluyor onu soruyorum? Quote Link to comment Share on other sites More sharing options...
Dexter18 Posted December 28, 2014 Share Posted December 28, 2014 Quote Link to comment Share on other sites More sharing options...
GokhanArilik Posted December 28, 2014 Author Share Posted December 28, 2014 Çok çok sağol abi ya senide uğraştırdım gece gece kusura bakma Quote Link to comment Share on other sites More sharing options...
Dexter18 Posted December 28, 2014 Share Posted December 28, 2014 Önemli değil ne demek Üniversite 1 de çok uğraşmıştım bu döngü ve kodlarla. Bu işin ticari kısmı iyidir ama çok sıkıcı bir iş hiç çekilmiyor. Quote Link to comment Share on other sites More sharing options...
GokhanArilik Posted December 28, 2014 Author Share Posted December 28, 2014 Sorma ya üniversiteden soğudum. 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.