Разработка программы, демонстрирующей выполнение функций рисования геометрических фигур (Лабораторная работа по № 1), страница 4

             printf("\nVvedi koordinaty vnutrennei trapecii:\n") ;

             printf("%d %d %d %d %d %d %d %d" ,MAS1[0] , MAS1[1] ,

                                                                        MAS1[2] , MAS1[3] ,

                                                                        MAS1[4] , MAS1[5] ,

                                                                        MAS1[6] , MAS1[7] );

       }

int Find_Error_Parallel ( int MAS[] )

                            {

                             if (

                                      ( MAS[0]-MAS[2] ) * ( MAS[5]-MAS[7] ) ==

                                      ( MAS[1]-MAS[3] ) * ( MAS[4]-MAS[6] )

                                                                                                   )

                                                                                         return 1 ;

                             if (

                                      ( MAS[2]-MAS[4] ) * ( MAS[1]-MAS[7] ) ==

                                      ( MAS[0]-MAS[6] ) * ( MAS[3]-MAS[5] )

                                                                                                  )

                                                                                         return 1 ;

                             if (

                                      MAS[0]-MAS[2] == 0 && MAS[4]-MAS[6] == 0 ||

                                      MAS[1]-MAS[3] == 0 && MAS[5]-MAS[7] == 0

                                                                                                     )

                                                                                         return 1 ;

                             if (

                                      MAS[2]-MAS[4] == 0 && MAS[3]-MAS[5] == 0 ||

                                      MAS[0]-MAS[6] == 0 && MAS[1]-MAS[7] == 0

                                                                                                  )

                                                                                         return 1 ;

                             else return 0 ;

                            }

int tri_tochki (int a,int b,int c,int d,int e,int f)

               {

                float x,y,z;

                z = sqrt(pow(e-a,2)+pow(f-b,2)) ;

                x = sqrt(pow(c-a,2)+pow(d-b,2)) ;

                y = sqrt(pow(e-c,2)+pow(f-d,2)) ;

                if (x+y==z) return 1 ;

                else return 0 ;

               }

int Find_Error_Road ( int MAS[] )//проверка принадлежности 3_х точек одной

                                                        //прямой

                               {

                                    if (

                                        tri_tochki(MAS[0],MAS[1],MAS[2],MAS[3],MAS[4],MAS[5])||

                                        tri_tochki(MAS[0],MAS[1],MAS[2],MAS[3],MAS[6],MAS[7])||

                                        tri_tochki(MAS[0],MAS[1],MAS[4],MAS[5],MAS[6],MAS[7])||

                                        tri_tochki(MAS[2],MAS[3],MAS[4],MAS[5],MAS[6],MAS[7])

                                                                                               ) return 0 ;

                                    else return 1 ;

                               }

int Vlojennost ( int MAS[] , int MAS1[] )

                        {

                          int gd , gm , error ;

                          detectgraph( &gd , &gm ) ;

                          initgraph ( &gd , &gm , "" ) ;

                          error = graphresult() ;

                          if ( error != grOk )