![opposite paramids in C++](https://code-seekers.com/wp-content/uploads/2022/03/shape1-1024x474.png)
Code:
#include<iostream>
using namespace std;
int main()
{
int i,j,k;
for(i=5;i>=1;i--)
{
for(j=5;j>=i;j--)
cout<<" ";
for(k=1;k<=(2*i-1);k++)
cout<<"*";
cout<<endl;
}
for(i=4;i>=1;i--)
{
for(j=1;j<=i;j++)
cout<<" ";
for(k=9;k>=(2*i-1);k--)
cout<<"*";
cout<<endl;
}
}
Output:
*********
*******
*****
***
*
***
*****
*******
*********