3.3-1933 problem A
#include <stdio.h> int main(void){ int h; while(scanf("%d", &h) != EOF){ int a = h + 2 * (h-1); for(int i=0; i<h; i++){ for(int k = 0; k < a - (h + 2 * i); k++) printf(" "); for(int j = 0 ; j < h + 2 * i; j++) printf("*"); printf("\n"); } } return 0; }