Parallel numerical sequence in matrix

So, I made program that can find inverse diagonals of the square matrix and count it average. Now I need to make that program to find parallel numerical sequence below inverse diagonals. Example:
If I have matrix like this
1 2 3
4 5 6
7 8 9
Program says that inverse diagonals is 3 5 7
My program should also say that parallel to these diagonals (below) are 8 6 and 9.
This program can find one sequence below, but I want to make it able to find all sequences and i don't know hot to make it.
Thanks.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
  #include<iostream>
using namespace std;
int main()
{
    double A[10][10],IS=0;
 int n,VV;
 cout << "Number of lines and columns : ";
 cin >> n;
 for (int i=0;i<n;i++)
 {
  for (int j=0; j<n;j++)
  {
cout << "insert el. nb."<< i << " "<< j << endl; 
    cin >> A[i][j]; 
  }
 }
 for (int i=0;i<n;i++)
 {
  for (int j=0; j<n;j++)
  {
	  
    cout << A[i][j]<<" "; 
  }
  cout << endl;
 }
 int w=0;
int k = n-1;
for(int v = 0; v < n; v++)
    for(;k > -1;)
    {
		for(;w<n-1;)
		{
		cout<<A[v+1][k]<<" ";
		w++;
		break;}
		IS +=A[v][k];
        k--;
        break;
    }
 cout<<"Inverse diagonal arithmetic average: "<<IS/n<<endl;
 return 0;
}
I'm working on it. Trying to make sense of the inverse-diagonal for-loop and generally straightening it up. Once I get it all straightened out, I'll post my code.
Alright I have written my own code which does the same thing as all your other stuff, but is cleaner. I also was able to add a function that outputs the rest of the diagonals starting from upper-left to the bottom-right.

Would you like me to post my function so you can see it?
Would you like me to give you the entire program which is just your code plus the function?
http://pastebin.com/n0CXprh4

There you go. Hope I don't get in trouble by mods
Thank you Sherre02, yours program gave me few ideas how to upgrade my program.
Hey, post what else you make. I wanna see where you're taking this thing!
Topic archived. No new replies allowed.