#include <stdio.h>
int main(int argc, const char * argv[]) {
for(int i = 1;i <= 6;i++){
for(int j = 1;j <= 7 - i;j++){
printf(" ");
}
for(int k = 0;k < 2 * i - 1;k++){
printf("*");
}
printf("\n");
}
for(int i = 1;i <= 5;i++){
for(int j = 0;j <= i;j++){
printf(" ");
}
for(int k = 9;k >= 2*i - 1;k--){
printf("*");
}
printf("\n");
}
return 0;
}
*
***
*****
*******
*********
***********
*********
*******
*****
***
*
Program ended with exit code: 0
初学见笑啦。 |
|