SteveDawg85
03-01-2006, 10:49 PM
My professor assigned us a project to create a specific type of pattern using some of the following traits:
it will ask the user for the # of lines to be displayed
it will ask the user for the character to be displayed
It will start from the top right and slowly be decrease by one
Ex.
5 lines and using *
*
**
***
****
*****
(actually, the above is supposed to start from the top right and work its way down. so just 'mirror' the image)
Something similar to this. so far I have this but I am not sure if i am going down the right track
void patter (void)
{
char ch;
int lines;
//Then I am pertty sure i have to use nested loops by I'm not too familiar with what to insert in them. I know i have to use setw() and also the for loops.
}
Any help would be appreciated!!
thanks
-Steve
it will ask the user for the # of lines to be displayed
it will ask the user for the character to be displayed
It will start from the top right and slowly be decrease by one
Ex.
5 lines and using *
*
**
***
****
*****
(actually, the above is supposed to start from the top right and work its way down. so just 'mirror' the image)
Something similar to this. so far I have this but I am not sure if i am going down the right track
void patter (void)
{
char ch;
int lines;
//Then I am pertty sure i have to use nested loops by I'm not too familiar with what to insert in them. I know i have to use setw() and also the for loops.
}
Any help would be appreciated!!
thanks
-Steve