Original Post
I need to implement a recursive function to compute the number of 0 that are next to another 0.
A data file is read into an array, and looks something like this:
111111111111111
100110011010001
110010000011101
111011110001101
111000111011111
111001100000111
111111111111111
This is the section where i''m think the recursion need to go?
void AreaCal()
{
if ((Grid[Row][Col] == ''1'') || (Grid[Row][Col] == ''²''))
Area = 0;
else
{
Grid[Row][Col] = ''²'';
Area ++;
}
}
This section takes the coordinates entered in by user and check to see if the coordinates contains a 0 or 1. If it contains a 0 then it replace the 0 with ASCII value 178. I have an ideal on how to implement the recursion, just not sure how to code it out to make it work. Any suggestion?