How do you to print out two arrays and their index number?

Hi I have to print out two arrays called "tumor" and "liver" ordered by their indexes. How exactly do I do that? It is supposed to look like this:

Printing 2 arrays Index Tumor Liver ------------
0 577 162
1 563 273
2 659 302
3 591 46
4 641 0
5 614 366
Assuming integer arrays tumor[] and liver[] of SIZE = 6:
for ( int i = 0; i < SIZE; i++ ) cout << i << " " << tumor[i] << " " << liver[i] << endl;
Topic archived. No new replies allowed.