well friend I think thats you can do it by loops , playing with the cout''s also by using ( \t ) - ( \n ) .........
I think that your solution was the basic step for all others shapes
I will list some for you , I hope that its allowed
--------------------------------------------------------------------------------------
*
***
*****
*
*
*
*
*
#include <iostream>
using namespace std;
//This program was written by the Programmer Ali Denno
void main ()
{
int x, k, i, j;
for(k=1;k<=8;k++)
{
if(k!=2 && k!=3)
{
for(i=1;i<=5;i++)
{
if(i==3)
cout<<"*";
else
cout<<" ";
}
cout<<endl;
}
else
if(k==2)
{
for(j=1;j<=5;j++)
{
if(j==1 || j==5)
cout<<" ";
else
cout<<"*";
}
cout<<endl;
}
else
{
for(x=1;x<=5;x++)
{
cout<<"*";
}
cout<<endl;
}
}
}
--------------------------------------------------------------------------------------
***
* *
* *
* *
* *
***
#include <iostream>
using namespace std;
//This Program was written by the programmer Ali Denno
void main()
{
int x, i, j, b;
for(x=1;x<=6;x++)
{
if(x==1 || x==6)
{
for(i=1;i<=7;i++)
{
if(i==3 || i==4 || i==5)
cout<<"*";
else
cout<<" ";
}
cout<<endl;
}
else
if(x==2||x==5)
{
for(j=1;j<=7;j++)
{
if(j==2||j==6)
cout<<"*";
else
cout<<" ";
}
cout<<endl;
}
else
{
for(b=1;b<=7;b++)
{
if(b==1||b==7)
cout<<"*";
else
cout<<" ";
}
cout<<endl;
}
}
}
--------------------------------------------------------------------------------------
an empty square
#include <iostream>
using namespace std;
//This Program was written by the programmer Ali Denno
void main()
{
int i, j, k;
for(k=1;k<=6;k++)
{
if(k==1||k==6)
{
for(i=1;i<=6;i++)
cout<<"*";
cout<<endl;
}
else
{
for(j=1;j<=6;j++) …