#include<iostream>
#include<cstdio>
#include<cstring>
#include<cassert>
using namespace std;
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
int n2=n*3-2;
int n3=n*2-2;
for(int i=0;i<n;i++)
{
int j=0;
n3=n*2-2-i*2;
for(;j<n3;j++)
{
putchar(' ');
}
for(;j<n2;j++)
{
putchar('*');
}
putchar('\n');
}
}
#ifdef _DEBUG
system("pause");
#endif
return 0;
}
/**************************************************************
Problem: 1065
User: cust123
Language: C++
Result: Accepted
Time:60 ms
Memory:1520 kb
****************************************************************/
题目1065:输出梯形
最新推荐文章于 2021-04-04 04:03:51 发布