diff options
author | RossTheRoss <msattr@gmail.com> | 2019-04-04 19:55:12 -0500 |
---|---|---|
committer | RossTheRoss <msattr@gmail.com> | 2019-04-04 19:55:12 -0500 |
commit | 585f50afbc05b0da3683eb6a6889c7e80f32f529 (patch) | |
tree | 017fd28486ae3203eb35135fe83067e946df61d3 /ee1301/wk5/hw5_directory/strap012_HW5C.cpp | |
parent | ???? (diff) | |
download | homework-585f50afbc05b0da3683eb6a6889c7e80f32f529.tar homework-585f50afbc05b0da3683eb6a6889c7e80f32f529.tar.gz homework-585f50afbc05b0da3683eb6a6889c7e80f32f529.tar.bz2 homework-585f50afbc05b0da3683eb6a6889c7e80f32f529.tar.lz homework-585f50afbc05b0da3683eb6a6889c7e80f32f529.tar.xz homework-585f50afbc05b0da3683eb6a6889c7e80f32f529.tar.zst homework-585f50afbc05b0da3683eb6a6889c7e80f32f529.zip |
????
Diffstat (limited to 'ee1301/wk5/hw5_directory/strap012_HW5C.cpp')
-rw-r--r-- | ee1301/wk5/hw5_directory/strap012_HW5C.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ee1301/wk5/hw5_directory/strap012_HW5C.cpp b/ee1301/wk5/hw5_directory/strap012_HW5C.cpp index dc223dd..3fd91d1 100644 --- a/ee1301/wk5/hw5_directory/strap012_HW5C.cpp +++ b/ee1301/wk5/hw5_directory/strap012_HW5C.cpp @@ -16,7 +16,7 @@ using namespace std; int maxRow = -1, maxColumn = 0; void getInput(int input[SIZE][SIZE]); void makeNewArray(int oldArray[SIZE][SIZE], int newArray[SIZE][SIZE]); -//void pixelAverage(int inArray[SIZE][SIZE], int outArray[SIZE][SIZE]); +void pixelAverage(int inArray[SIZE][SIZE], int outArray[SIZE][SIZE]); void printArray(int array[SIZE][SIZE]); int main() { @@ -24,7 +24,7 @@ int main() { outputArray[SIZE][SIZE] = {0}; getInput(inputArray); makeNewArray(inputArray, outputArray); - pixelAverage(inputArray, outputArray); + //pixelAverage(inputArray, outputArray); printArray(outputArray); } @@ -56,9 +56,9 @@ void getInput(int input[SIZE][SIZE]) { // oldArray: Array generated in getInput of SIZE // newArray: Array of same dimensions and data void makeNewArray(int oldArray[SIZE][SIZE], int newArray[SIZE][SIZE]) { - for (int row = 0; row < maxRow-1; row++) { - for (int column = 0; column < maxColumn-1; column++) { - newArray[row][column] = oldArray[row][column]; + for (int row = -1; row < maxRow; row++) { + for (int column = -1; column < maxColumn; column++) { + newArray[row][column] = oldArray[row-1][column]; } } } |