I'm currently writing a C program that finds the elements that are larger than all of their neighbors in a multidimensional array. So if my input is
3 2 9
13 7 6
1 5 8
It should print
9
13
8
However, it doesn't seem to be working :( I've run through it a couple of times and can't seem to find anything wrong with it, other than the possibility that I'm handling my arrays incorrectly. Do you guys have any suggestions?
Here is my current code. http://pastebin.com/sJBhQMjy
Thank you!
PS: On my pastebin link I said "two-dimensional array"-- this was a typo, I just meant multidimensional.