Need help with creating increment table

So I need help creating this program:

TableA      TableB
1             10
2             20
3             30
4             40
5             50


I know I need to use this: (Example) for (int i= 1; i<=5;i++;)

But my question is how can I create a program like that, and performing two functions at once?

And same for:
TableA
5
4
3
2
1

I'm assuming it'd be the same as the for, but with ++i. I don't need the answer, just some help on how to do it. Would I use void?
Last edited on
In pseudo code:
1
2
3
4
print the headings TableA    Table B
for (int i=1; i<6; ++i) {
   print the i'th row. The the value of i to compute the values to print
} 


For the second one you count down:
1
2
3
for (int i=5; i>0; --i) {
    print i;
}
Topic archived. No new replies allowed.