- #1
Naldo6
- 102
- 0
I need to do a pyramid in C++ like this one:
*
* *
* * *
* * * *
* * * * *
buti just know how to do the figure at one side:
*
* *
* * *
* * * *
* * * * *
# include <stdio.h>
# include <math.h>
void main()
{
int count,count2;
for(count=1;count<=5;count++)
{
for(count2=1;count2<=count;count2++)
printf(" *");
printf("\n");
}
}
Can anyone help me hoy to change from the side to a pyramid form?
*
* *
* * *
* * * *
* * * * *
buti just know how to do the figure at one side:
*
* *
* * *
* * * *
* * * * *
# include <stdio.h>
# include <math.h>
void main()
{
int count,count2;
for(count=1;count<=5;count++)
{
for(count2=1;count2<=count;count2++)
printf(" *");
printf("\n");
}
}
Can anyone help me hoy to change from the side to a pyramid form?