Полезное:
Как сделать разговор полезным и приятным
Как сделать объемную звезду своими руками
Как сделать то, что делать не хочется?
Как сделать погремушку
Как сделать так чтобы женщины сами знакомились с вами
Как сделать идею коммерческой
Как сделать хорошую растяжку ног?
Как сделать наш разум здоровым?
Как сделать, чтобы люди обманывали меньше
Вопрос 4. Как сделать так, чтобы вас уважали и ценили?
Как сделать лучше себе и другим людям
Как сделать свидание интересным?
Категории:
АрхитектураАстрономияБиологияГеографияГеологияИнформатикаИскусствоИсторияКулинарияКультураМаркетингМатематикаМедицинаМенеджментОхрана трудаПравоПроизводствоПсихологияРелигияСоциологияСпортТехникаФизикаФилософияХимияЭкологияЭкономикаЭлектроника
|
Продолжение приложения А. 442. fprintf(fil,Point not found
438. perniz=perver=0; 439. } //**** IF ******** 440. else 441. { 442. fprintf(fil,"Point not found! Change direction to UP\n"); 443. napr = 4; 444. perniz = 1; 445. } 446. break; 447. case 3: 448. printf("Search to the left -->"); 449. fprintf(fil,"Search to the left -->"); 450. if((nst=levpoisk(ik,jk))>=0) 451. { 452. if((top2=(struct cik*)malloc(sizeof(struct cik))) == NULL) 453. abort(); 454. printf("founded\n\r"); fprintf(fil,"founded\n"); 455. if(!topnast1) 456. topnast1=top2; 457. else 458. top3->next=top2; 459. top3=top2; 460. top2->next=NULL; 461. top2->ick = ik; 462. top2->jck = jk; 463. ch++; 464. //************ PRODOLZHENIE 3 POISKA ************* 465. top2->prnapr = 3; 466. pr("top2",top2); 467. napr = 4; jk = nst; 468. perlev = perpr = 0; 469. } // ******* IF ***** 470. else{ 471. fprintf(fil,"Point not found! Change direction to RIGHT\n"); 472. napr = 1; 473. perlev = 1; 474. } 475. break; 476. case 4: 477. printf("Search to the up --->"); 478. fprintf(fil,"Search to the up --->"); 479. if((nstr=verpoisk(ik,jk))>=0) 480. { 481. if((top2=(struct cik*)malloc(sizeof(struct cik)))==NULL) 482. abort(); 483. printf("founded\n\r"); fprintf(fil,"founded\n"); 484. if(!topnast1) topnast1=top2; 485. else top3->next=top2; 486. top3=top2; 487. top2->next=NULL; Продолжение приложения А
488. top2->ick=ik; 489. top2->jck=jk; 490. ch++; 491. top2->prnapr = 4; 492. pr("top2",top2); 493. napr = 1; 494. ik = nstr; 495. perver = perniz = 0; 496. } 497. // *****If ************** 498. else 499. { 500. fprintf(fil,"Point not found! Change direction to DOWN\n"); 501. napr = 2; 502. perver = 1; 503. } 504. break; 505. } 506. // ************ SWITCH ******************** 507. // ************** PRODOLZHENIE 4 POISKA ******************** 508. if(perlev == 1 && perpr == 1) 509. { 510. *(matr2+ik*n+jk) = 0; 511. ik = top3 ->ick; 512. jk = top3 ->jck; 513. napr = top3->prnapr; 514. top3 = topnast1; 515. printf("Zerro 1\n\r"); 516. for(top2=topnast1;top2->next!=NULL;top2=top2->next) 517. top3 = top2; 518. top3 -> next=NULL; 519. perlev = perpr = 0; // if(ch == 1) 520. if(top2==top3) 521. { 522. fl3=1; 523. break; 524. } 525. else 526. { 527. top3->next=NULL; 528. free(top2); 529. ch--; 530. printf("Viynimaem tochky: (%d,%d)=%d\n",ik,jk,*(matr2+ik*n+jk)); 531. fprintf(fil,"Viynimaem tochky: (%d,%d)=%d\n",ik,jk,*(matr2+ik*n+jk)); 532. pr("top2",top2); 533. } 534. perpr = 0; 535. perlev = 0; 536. } 537. // IF
|