#include #include #define MAXX 100 #define MAXY 100 int X, Y; char tmp[1000]; int x1,y1,x2,y2; char pole[MAXX][MAXY]; int i,j,k,l,m; void swpmin(int* a, int *b){ int pom; if(*b<*a){ pom=*a; *a=*b; *b=pom; } } void swp(int* a, int *b){ int pom; pom=*a; *a=*b; *b=pom; } void putline(int x1,int y1,int x2,int y2){ if (x1==x2){ swpmin(&y1, &y2); for(i=y1;i<=y2;i++){ switch(pole[x1][i]){ case ' ': case '|': pole[x1][i]='|'; break; case '-': case '+': pole[x1][i]='+'; break; default: pole[x1][i]='*'; } } } else if(y1==y2){ swpmin(&x1, &x2); for(int i=x1;i<=x2;i++){ switch(pole[i][y1]){ case ' ': case '-': pole[i][y1]='-'; break; case '|': case '+': pole[i][y1]='+'; break; default: pole[i][y1]='*'; } } } else{ if (x1>x2){swp(&x1,&x2);swp(&y1,&y2);} // printf("uvnitr %d %d %d %d\n",x1,y1,x2,y2); if(y1