Results 1 to 4 of 4

Thread: Help!

  1. #1

    Thread Starter
    Junior Member Ezra's Avatar
    Join Date
    Sep 2002
    Location
    northrend
    Posts
    23

    Unhappy Help!

    How do you program in java to have an output like this:
    Code:
                           1
                          212
                         32123
                        4321234
                       543212345
    Its a pyramid, by the way.
    Thanx.
    Last edited by Ezra; Jan 16th, 2003 at 12:54 AM.

  2. #2
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Here you get half a pyramid.
    Code:
    class Builder {
      public static void main(String[] args){
      
      StringBuffer sb = new StringBuffer(); 
      for(int i = 0; i < 15; ++i){
       sb.append(i); 
       System.out.println(sb);
      }
     }
    }

  3. #3

    Thread Starter
    Junior Member Ezra's Avatar
    Join Date
    Sep 2002
    Location
    northrend
    Posts
    23
    What about the other half?

  4. #4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width