How do I get the inverse of col1?
Code:
#include <stdio.h>
#include <conio.h>
#include <iostream>
#include <ctype.h>
int printArray(int pary[][5]);
int manipulateArray(int mary[][5]);
int main()
{
//Initialize 2D Array
int array[5][5] =
{
{2,4,6,8,10},
{12,14,16,18,20},
{22,24,26,28,30},
{32,34,36,38,40},
{42,44,46,48,50}
};
int reverse;
//Print Array
printArray(array);
printf("\n\n");
//Reverse the first column
//Print the array on the screen
manipulateArray(array);
//Swap the contents of column 3 and column 4
//Print the array on the screen
//Sort row 5 in descending order
//Sum the contents of the entire array
return 0;
}
int printArray(int pary[][5])
{
int r,c; //row and col counter
for (r = 0; r <= 4; r++)
{
for (c = 0; c <=4; c++)
{
printf("\t%d", pary[r][c]);
}
printf("\n");
}
}
int manipulateArray(int mary[5][5])
{
int reverse[5]; //store temp value
int r,c; //row and col counter
for (r=4;r<=0;r++)
{
for (c<=4;c=0;c++)
{
reverse[5]=mary[0][c];
}
printf("\t%d",mary[r][c]);
}
printf("\n");
}