On Tuesday 23 October 2012 11:52, in comp.lang.c,
wrote:
> guys help me in making thi program?
Sure
This is a star
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
*
***
*****
***************
*************
***********
*************
***************
*****
***
*
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It is made up of two triangles
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
*
***
*****
*******
*********
***********
*************
***************
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
and
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
***************
*************
***********
*********
*******
*****
***
*
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
superimposed over each other.
The contents of each row of each triangle has a mathemetical relationship to
the order of the row; both the number of stars, and the number of spaces to
indent to the first star can be computed knowing only the row number.
Now, all you have to do is formulate a loop that builds the star in rows;
computing the number of stars and the indent for each row of each triangle,
and superimposing one triangle over the other.
It's just a simple matter of programming.
--
Lew Pitcher
"In Skills, We Trust"