标签:
//--------------------------------------- * * * *** *** *** ***** ***** ***** ******* ******* ******* *************************** //------------------------------------- #include <stdio.h> #include <stdlib.h> int main() { int n; scanf("%d",&n); for (int i=1; i<=n; i++) { for (int j=1; j<=n-i; j++) printf(" "); for (int j=1; j<=i*2-1; j++) printf("*"); for (int j=1; j<=(n-i)*2; j++) printf(" "); for (int j=1; j<=i*2-1; j++) printf("*"); for (int j=1; j<=(n-i)*2; j++) printf(" "); for (int j=1; j<=i*2-1; j++) printf("*"); printf("\n"); } return 0; }
标签:
原文地址:http://www.cnblogs.com/2014fhj/p/4414768.html