Search:

Type: Posts; User: helloworld922

Search: Search took 0.11 seconds.

  1. Re: help with loop to print an equliateral asterisk triangle

    the space equation is right. Again, stars is correct, but the thing I was hinting towards is a general formula for stars with N rows.

    stars = 2 * (N - row) - 1
    space = row
  2. Re: help with loop to print an equliateral asterisk triangle

    Almost right on the stars: what if you wanted to print an inverted triangle with 6 rows?
  3. Re: help with loop to print an equliateral asterisk triangle

    I'll give you some hints:

    1. The number of spaces to draw out is N - 1 - row (starting with row 0)
    2. The number of * to draw out starts at 1 and increases by 2 each time through, so 2 * row + 1...
  4. Re: help with loop to print an equliateral asterisk triangle

    This is a forum dedicated to Java programming, not C/C++ :P
Results 1 to 4 of 4