2632 稀疏字母金字塔(2)
Time Limit : 2000/1000 MS(Java/Others) | Memory Limit : 65536/32768 KB(Java/Others)
Submits : 94 | Solved : 45
Description
设计函数,对于给定的整数n,显示用字母组成的n层金字塔。
Input
在主函数中给定一个整数n。
Output
设计函数显示n层的字母金字塔。
Sample Input
6
Sample Output
A
B B
C C C
D D D D
E E E E E
F F F F F F Template
#include<stdio.h>
@-@ //设计函数,打印n行的字母金字塔
int main()
{
int n;
scanf("%d",&n);
pyramid(n); //调用函数
return 0;
}HINT
每个字母后面都有空格
Source
NBU OJ
浙公网安备 33020402000166号