The Axe Problem

hey guys, i'm trying to make a axe using '*' im not sure how to do it.. can someone help me please.
Last edited on
What? Can you be more specific?
*******
********
*********
********
*******
***
***
***
***
***
***
***
***

Alas, I'm not an artist.
that messed up the image but its basically a axe made with stars. Your using loops and stuff, a user enters an integer and it makes it that wide and long
heres the sides for the axe
int n, c, k;

printf("Enter number of rows: ");
scanf("%d",&n);

for ( c = 1 ; c <= n ; c++)
{
for ( k = 1 ; k <= c ; k++ )
printf("*");

printf("\n");
}

for ( c = n - 2 ; c >= 0 ; c-- )
{
for ( k = c ; k >= 0 ; k-- )
printf("*");

printf("\n");
}
and than it needs a handle in the middle
please help me make the axe
When n=6, this is the output from the code above.
*
**
***
****
*****
******
*****
****
***
**
*


Please explain (preferably with the aid of sample output) what you mean by: "and than it needs a handle in the middle".
that triangle is what on both sides of the handle

Thats the handle. Than the triangle above goes on both sides of the triangle but flipped on 1 side

**
**
**
**
**
**
**
**
**
The user enters an integer and the triangles become that big. The axe handle is always going to be 10 rows long.
Topic archived. No new replies allowed.