C语言实验——打印金字塔
Time Limit: 1000 ms Memory Limit: 65536 KiB
Problem Description
输入n值,打印下列形状的金字塔,其中n代表金字塔的层数。
Input
输入只有一个正整数n。
Output
打印金字塔图形,其中每个数字之间有一个空格。
Sample Input
3
Sample Output
1 1 2 1 1 2 3 2 1
#include<stdio.h>
int main()
{
int n;
int i;
int c;
int temp;
scanf("%d",&n);
for(i