[url=https://imgtu.com/i/XwPPOS][img]https://s1.ax1x.com/2022/06/05/XwPPOS.jpg[/img][/url]
#include <iostream>
using namespace std;
int main()
{
int n=101;
char ch='*';
for (int i=1;i<=(n-1);i+=2)
{
for(int ich=0;ich<(n-i)/2;ich++)
{
cout << ' ';
}
for(int ich=0;ich<i;ich++)
{
cout << ch;
}
cout << endl;
}
for (int i=0;i<n;i++)
{
cout << ch;
}
cout << endl;
for (int i=n-2;i>=0;i-=2)
{
for(int ich=0;ich<(n-i)/2;ich++)
{
cout << ' ';
}
for(int ich=0;ich<i;ich++)
{
cout << ch;
}
cout << endl;
}
}