• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help with columns of Pyramid of numbers

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok this problem is driving me crazy! I have to get a pyramid that has 8 rows and as the number goes down in each column it multiplies by two. I have a simple program that i made that has the pyramid in 8 rows that has the same numbers in each column. My problem is that i cannot figure out how to change the format of the columns to what i need

The code that i have is:


As you can see the column numbers are all the same. I need them to multiply by two as it goes down. For example, the column with all ones would read from top to bottom 1, 2, 4, 8,16, 32,64,128.

Any help will be much appreciated!
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
...
 
Nick Hallloran
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
YES it is! Thank You Very Much! After looking at it, i realized how easy it actually was and that i was over thinking it!
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vaishali,
I am sorry, but I have edited out your solution.

Here at the Ranch, especially in the beginners forum, we encourage people to arrive at the solution themselves. That is the best way to learn. Though you meant well, it hardly helped learning.
In future, please post hints or identify where the code is going wrong. But avoid giving ready made solutions.
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Maneesh Godbole

sorry for providing direct solution.

I cannt write english properly thats why i sent program.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic