Cuadro de caracteres
Publicado por JUAN PABLO (3 intervenciones) el 25/09/2019 03:02:37
El problema es que el programa tiene que hacer un cuadro, el usuario tiene que poner base y altura, tengo solo esto:
no me hace el cuadrado completo, y me hace todo revuelto ayudaaaaa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include<stdio.h>
#include<stdlib.h>
int main() {
int alt, base;
char esi=201, esd=187, eid=188, eii=200;
char vert= 186, hor=205;
printf("Programa que hace un cuadro\n");
printf("Dame la base de tu cuadro:");
scanf("%d", &base);
printf("Dame el ancho de tu cuadro:");
scanf("%d", &alt);
printf("\n");
printf("%c%c",esi, esd);
// printf("\n");
//printf("%c", esd);
// printf("%c%c",eii, hor);
// printf("%c",eii);
for (int i=0; i<base; i++)
{
printf("%c", hor);
}
for (int i=0; i<alt; i++)
{
printf("\n");
printf("%c", vert);
}
printf("\n");
system("PAUSE");
}
no me hace el cuadrado completo, y me hace todo revuelto ayudaaaaa
Valora esta pregunta


0