Asterisks Shapes

I need to make this this shape out (or similar) of asterisks:
1
2
3
4
5
     *             *
     * *       *  *
     * * * * *  *
     * *       *  *  
     *              * 


It's basically two sideways triangles...It's hard to show with this...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//I somewhat know how to do 'nested for loops'. I can only do one triangle though...

#include <iostream>
using namespace std;


int main()
{
    cout<<"Insert A Number...\n" <<endl;
int i;
int j;
cin >> i;
for(i;i<11;i++)
{
    cout<<endl;
    for(j=1;i>j;j++)
    {
        cout<<'$';
    }
}
for(i;i>0;i--)
{
    cout<<endl;
    for(j=1;i>j;j++)
    {
        cout<<'*';
}
    }

cin.get();
}
I fixed your code. try it http://cpp.sh/9hl

btw you should move this topic to general c++ or beginners sub-forum.
Topic archived. No new replies allowed.