Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Cuadrado asteriscos hueco con regalito
/Title of this code //clang 3.6.0 #include <stdio.h> #include <math.h> int main(void) { /* ***** * * * * *** * * ***** */ int i, j,k, dim; printf("\ndimensión ?: "); scanf(" %d", &dim); printf("\n"); if (dim>1 && dim<50) { for (i=1; i<=dim; i++) printf("*"); printf("\n"); // aqui pinto las otras filas for(i=1;i<=dim-2; i++) { printf("*"); // pintar los espacios for(j=1; j<=dim-2; j++) if(i==(dim/2) && j==(dim/2)) printf("*"); else printf(" "); if (i!=dim/2) printf("*"); else for(k=1; k<dim/2; k++) printf("*"); printf("\n"); } for (i=1; i<=dim; i++) printf("*"); } else printf("\nAl menos dimension 1 y menor que 50!!!"); return 0; }
run
|
edit
|
history
|
help
0
Numero pi Euler
marquee text in C
Herout (67) - 5
random()%N stddev
myblkqsort-ptr 20m numbers
Triples bucles anidados
lab7OOP 0.1
Find the length of largest subarray with equal number of 0's and 1's using recursion
Herout (67) - 14
C - Append Character to String