proper usage of setw

Hello everyone. i'm a beginner in C++ so please don't scold me too much.
My problem is: i've got a set of columns in the console wizard, which looks like this:
1x1 = 1 2x1 = 2
1x2 = 2 2x2 = 4
1x3 = 3 2x3 = 6
1x4 = 4 2x4 = 8
1x5 = 5 2x5 = 10
1x6 = 6 2x6 = 12
1x7 = 7 2x7 = 14
1x8 = 8 2x8 = 16
1x9 = 9 2x9 = 18
1x10 = 10 2x10 = 20

and so on. a multiplication table. being set this way on the screen lower part of a column makes lower part of the next column move right a little bit due to greater number of numbers in a line. regretfully i still can't comprehend how to use setw properly. what does setw do? does it determine space between displayed items or determine space for the item itself? or both? or maybe i should align the columns relatively to each other without using setw at all? i will be really thankful to you, guys, for the answer.
Topic archived. No new replies allowed.