I am trying to create table in java by taking in user input. So for the three the table should look like:
I am looking for any idea on how to go about doing this – may be just pseudo code would be helpful I can fill in the blanks. Thank you for your help 🙂
Here is Javascript code to do what you want:
Here it is working: http://jsfiddle.net/uqP3M/
I won’t give you Java code since this is probably homework and you should try to understand it while converting it to Java. If you are unsure of the
<<operator. Just know that(1 << x)means 2 to the power of x. That should help you understand it.