Probleme cu instructiunea for in C++

Se citeste n. Sa se afiseze urmatoarele forme. In exemplu n=4:

forme_for

1)

* * * *
* * *
* *
*

#include<iostream.h>
void main()
{
int n,i,j;
cout<<"n=";cin>>n;
for(i=1;i<=n;i++)
{
for(j=(n-i)+1;j>=1;j--)
cout<<'*'<<" ";
cout<<endl;
}
}

2)

1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16

#include<iostream.h>
void main()
{
int n,i,j;
cout<<"n=";cin>>n;
for(i=1;i<=n;i++)
{
for(j=n*(i-1)+1;j<=n*i;j++)
cout<<j<<" ";
cout<<endl;
}
}

3)

1 2 3 4
1 2 3 4
1 2 3 4
1 2 3 4

#include<iostream.h>
void main()
{
int n,i,j;
cout<<"n=";cin>>n;
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
cout<<j<<" ";
cout<<endl;
}
}

4)

4 3 2 1
1 2 3 4
4 3 2 1
1 2 3 4

#include<iostream.h>
void main()
{
int n,i,j;
cout<<"n=";cin>>n;
for(i=1;i<=n;i++)
{
if(i%2==0)
{
j=1;
while(j<=n)
{
cout<<j<<" ";
j++;}
cout<<endl;
}
else
{
j=n;
while(j>=1)
{
cout<<j<<" ";
j--;
}
cout<<endl;}
}
}