Your job for this program is to count the number of "blobs" in a 2D array. You will be given a text file containing a 2D matrix of 0's and *'s. A blob is connected group of *'s. The *'s are connected if they are von Neumann neighbors (top, bottom, left or right). Follow the guidelines below.
Example:
*** Your output heading and explanation of program should be here ****
Original world:
0 0 0 * 0 0 * 0 0 0 0 0 * 0 * 0 * 0 * 0
0 0 0 0 0 0 * 0 * * 0 * 0 0 * 0 0 0 0 0
0 0 * 0 0 0 0 0 0 0 * * 0 * 0 0 * * 0 0
* 0 0 0 0 0 0 0 0 0 * 0 * * 0 * 0 * 0 0
0 0 * * * * 0 * * 0 0 * * 0 0 0 0 * 0 0
* * * 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 0 0
0 * 0 0 0 0 0 0 0 0 0 0 * 0 0 0 0 0 * *
0 0 0 * 0 0 0 * 0 0 0 * 0 0 0 0 0 * 0 0
* * * 0 0 0 0 0 0 0 * 0 * 0 0 * 0 0 * 0
0 0 * 0 * * 0 0 * 0 0 0 0 0 0 0 0 0 0 0
* * 0 0 0 * * 0 * 0 0 0 0 * 0 * * * 0 0
0 0 0 0 0 0 * 0 * 0 * 0 0 0 * 0 0 * * *
* * 0 0 0 * 0 0 0 0 0 0 0 0 0 0 0 * 0 0
* 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 * * 0 0 * 0 0 0 0 0 0 * 0 0 0
0 0 * * 0 * 0 * 0 0 0 * 0 0 0 * 0 * 0 *
* * 0 0 * 0 0 0 0 0 0 0 * * 0 * 0 0 * *
* 0 * * 0 0 0 0 0 0 0 0 * 0 0 * 0 * 0 0
0 * * 0 * 0 * 0 0 0 0 0 * 0 * 0 0 0 * *
0 * 0 0 0 0 0 0 0 * 0 0 * 0 0 0 * * 0 0
World with mutated blobs:
0 0 0 # 0 0 # 0 0 0 0 0 # 0 # 0 # 0 # 0
0 0 0 0 0 0 # 0 # # 0 # 0 0 # 0 0 0 0 0
0 0 # 0 0 0 0 0 0 0 # # 0 # 0 0 # # 0 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