#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
int main() {
int i,j,n;
int a,b;
scanf("%d", &n);
for (i = 1; i <= n; ++i){
for (j = 1; j <= 2i-1;++j) {
putchar(’’);
}
putchar(’\n’);
}
for (a = n-1; a >= 1; --a){
for (b = 1; b <= 2 * a - 1;++b) {
putchar(’*’);
}
putchar(’\n’);
}
system(“pause”);
return 0;
}
.在屏幕上输出以下图案:
猜你喜欢
转载自blog.csdn.net/tianyuzilin/article/details/88826381
今日推荐
周排行