# Thread: need help in nested looping

1. ## need help in nested looping

hi to all,
i would just like to seek help to those who can help me.. thank you
here is the problem

Code:
```(1)
*****
****
***
**
*(1)
(2)
*****	*****(3)
****	 ***(3)
***     *(4)
**    ***
*   *****(4)
(5)55555
4444
333
22
1(5)
1(6)
22
333
4444
55555(6)

*there are six loops in all
so far  i have done only loop #2 can anyone help me with the other loops?

#include<stdio.h>
#include<conio.h>
main()
{
int x,y;
clrscr();
for(x=1;x<=5;x++)
{
for(y=1;y<=x;y++)
{
gotoxy(x,y+5);
printf("x");
}
}
getch();
}```
i dont know how to do the rest, can anyone give me an idea on how to continue?
i need to use nested looping. thanks.

2. Originally Posted by aljhay
hi to all,
i would just like to seek help to those who can help me.. thank you
here is the problem

Code:
```*****
****
***
**
*
*****	*****
****	 ***
***     *
**    ***
*   *****
55555
4444
333
22
1
1
22
333
4444
55555
so far this is what i have done

#include<stdio.h>
#include<conio.h>
main()
{
int x,y;
clrscr();
for(x=1;x<=5;x++)
{
for(y=1;y<=x;y++)
{
gotoxy(x,y+5);
printf("x");
}
}
getch();
}```
i dont know how to do the rest, can anyone give me an idea on how to continue?
i need to use nested looping. thanks.
Can you tell me which output you want , the star(*) program or the counting program(543212345). Please explain it clearly so that i can give you the solution.

3. the out put that i want is all of these in one printing, but, the loops are different for each. wait ill re-edit the output.

4. the out put that i want is all of these in one printing, but, the loops are different for each. wait ill re-edit the output.