Swapping values in two-dimensional array

Hi I was asked to make a c++ program that prints two-dimensional array and turns it into matrix with rows and columns.I did it with that.But now I need to swap the first row with the latest.And I'dont know how to do it with array's indexes.Here is the code.Can somebody help?
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
#include <iostream>
#include<iomanip>
#define SizeRow 3
#define SizeColumn 4
using namespace std;
int main()
{
	int table [SizeRow][SizeColumn];
	for(int i=0;i<3;i++)
	{
		for(int j=0;j<4;j++)
		{
			cin>>table[i][j];
		}
	}
	cout<<"Array Elements : "<<endl ;
	int i = 0;
	for( i = 0;i<3;i++)
	{
		for(int j=0;j<4;j++)
		{
			cout<<setw(8)<<table[i][j];
		}
	cout<<""<<endl;	
	}
	
Topic archived. No new replies allowed.