#include <stdio.h>
void main()
{
int n=0, i1=1,i2=0, linea=1;
scanf("%i",&n);
while(linea<=n) {
while(i1<n && i1<linea) {printf(" "); i1++;}
while(i1<=n) {printf("%i",i1); i1++;}
while(i2<n-linea) {printf("%i",n-i2-1); i2++;} printf("\n"); i1=1;i2=0; linea++; }
}
No hay comentarios:
Publicar un comentario