Java Exercise: Tables of squares and cubes

Hi guys , please help me with this homework. I kinda find it hard to do.

Write an application that calculates the squares and cubes of the numbers from 0 to 10 and prints the resulting values in table format.

Note: This program does not require any input from the user. :confused:

Re: Java Exercise: Tables of squares and cubes

What have you tried?

Start by writing down on a piece of paper what the program's output should look like. Then think about how the program could create it.

Re: Java Exercise: Tables of squares and cubes

I have done that already but I have no idea on how to make it appear in a table form.

--- Update ---

Can you tell me what the source code will look like?

Re: Java Exercise: Tables of squares and cubes

Can you post a sample of what the program's output should look like? Describe what goes on each line of the output and what the program needs to compute to create that output.

To print more than one value on a line, use the print() method. When you want the next thing printed to go on the next line use the println() method.

Re: Java Exercise: Tables of squares and cubes

You need to give us an idea what YOU think it looks like, and then we can work with that. If it's the best you can do, post what you wrote down on paper - please, not a picture, type it out.

Re: Java Exercise: Tables of squares and cubes

i already made a codes of that but i already format...it's kindda hard u know...

Re: Java Exercise: Tables of squares and cubes

It's even harder to help you without seeing your effort, impossible in fact. Post it.