进阶白发
2016-11-05 18:58
a
b b
c c c
#include <stdio.h>
int main()
{
int times;
int t = 0;
int h,j;
char n = 'A';
printf("请输入字母的行数:");
scanf("%d",×);
for(h = 1; h <= times; h++)
{
for(j = 1; j < times -h +1; j++)
printf(" ");
for(j = 1; j <= (2 * h -1) ; j++)
printf("%c", n);
printf("\n");
n++;
}
return 0;
}
C语言入门
926937 学习 · 21533 问题
相似问题