for loop

hello all,

I'm university student and i have final exam in c++ on monday very soon
so
i need some help

how to write a program in for loop the given output
1
2
3
4
   *
  ***
 *****
*******



can some one help me
?????

thanks
Last edited on
Reported. Reason: Homework.
Last edited on
By the look of it, you need 3 loops. (for) will work fine.

1. The first loop can take care of the vertical component.
2. The second can out put the white spaces. (decrease)
3. The third loop can output the *.(increase)

it will probably look something like this...

1
2
3
4
5
6
7
8
9
10
11
12
loop1
{
    loop2
    {
       Loop3
         {
          WHITE SPACES
          }
      That Star Thingy. 
     }
   ENDl; 
}


Last edited on
Topic archived. No new replies allowed.