You are on page 1of 1

LINEAS HORIZONTALES SALEN. EL PROBLEMA ES CON LAS VERTICALES.

NO LOGRO
ENCONTRAR LA FORMA
#include <stdio.h>
#include <stdlib.h>
#define n 1
//--------------------------------------------------------------------------void cuadrado (int x1, int y1,int x2, int y2)
{
char form [6]={218,191,217,192,196,179};
int i ;
gotoxy(x1,y1);
printf("%c",form[0]);
for (i = 0; i <x2-x1-1; i++) {
printf("%c",form[4]);
}
printf("%c",form[1]);
gotoxy (x1,y2);
printf("%c",form [3]);
for (i = 0; i < x2-x1-1; i++) {
printf("%c",form[4]);
}
printf("%c",form[2]);
/*AQUI TENGO EL PROBLEM*/
gotoxy (x1,y1);
printf("%c",form[0]);
gotoxy (x1,y2);
for (i = 0; i < y2-y1-1; i++)
printf("%c",form[3]);
gotoxy (x1,y2);
for (i = 0; i < y2-y1-1; i++)
printf("%c",form[6]);
printf("%c",form[6]);
}
//---------void main (void)
{
int i,X1,Y1, X2,Y2;
printf("Introduce posicion (x,y) ");
scanf("%i %i %i %i",&X1,&Y1, &X2,&Y2);
cuadrado(X1, Y1,X2,Y2);
printf("\n");
system("pause");
}

You might also like