logo
Диссертация_2013_Даулбаева ММ

Продолжение приложения а

  1. printf("Весь цикл поиска сейчас начнется, надеюсь - \n что он будет не бесконечный или не бесполезный :( \n");

  2. printf("\n \t \t\tpress anykey to contunio\n");

  3. getch();

  4. while(fl3)

  5. {

  6. fl3=0;

  7. fl = 0;

  8. if((nst = prpoisk(ik,jk))>=0)

  9. {

  10. fprintf(fil,"\n\nВнимание!!!\n nst = %d \n",nst);

  11. fprintf(fil,"Ща будет поик идти ему бы...:Point found!\n");

  12. printf("И он пошел RIGHT:Point found !\n\r");

  13. napr = 2;

  14. jk = nst;

  15. top2->prnapr = 1;

  16. }

  17. else if((nstr = nizpoisk(ik,jk))>=0)

  18. {

  19. fprintf(fil,"DOWN: Point found !\n");

  20. printf("DOWN: Point found !\n\r");

  21. napr = 3;

  22. ik = nstr;

  23. top2->prnapr = 2;

  24. }

  25. else if((nst=levpoisk(ik,jk))>=0)

  26. {

  27. fprintf(fil,"LEFT:Point found !\n");

  28. printf("LEFT:Point found !\n\r");

  29. napr = 4;

  30. jk = nst;

  31. top2->prnapr = 3;

  32. }

  33. // **************** Prodolzhenie 1 poiska ***********************

  34. else if((nstr = verpoisk(ik,jk))>=0)

  35. {

  36. fprintf(fil,"UP:Point found !\n");

  37. printf("UP:Point found !\n\r");

  38. napr = 1;

  39. ik = nstr;

  40. top2->prnapr = 4;

  41. }

  42. else

  43. return(-1);

  1. while(!fl || *(matr2+ik*n+jk)!=-1)

  2. {

  3. fl=1;

  4. switch(napr)

  5. {