I am trying to implement these patters using for loop....I am having difficulties with them....If someone can help, would be great!!

I attached the pattern to a Image....

[ATTACH]10180[/ATTACH]

I tries this code for the third pattern...I have no Idea how to get them done....can anyone post codes for all of them?

```
int n=1,y=1,i=1,x=5;
for (i=1;i<=5;i++)
{ cout<<setw(x);
for(n=1;n<=y;n++)
{
cout<<"5";
}
cout<<endl;
y++;
x--;
}
```