qq_241随心_0
for (int i = 0; i < 7; i++)///方法:按空格个数的规律和数字的规律分别计算 { if (i<4) { for (int m = 0; m < 3- i; m++) printf(" "); for (int k = 0; k < 2 * i + 1; k++) printf("*"); printf("\n"); } else { for (int m = 0; m < i-3; m++) printf(" "); for (int k = 0; k < 7-(i-3)*2;k++) printf("*"); printf("\n"); } }