Hi there,
I think my main problem is that I can not fully understand the prompt of the assigned program..
It says that I should choose a character such as '#' for the darkest character '0', and a blank for the brightest character, when reading a 2D array of numbers as every number represents brightness level '9'.. then what should we display for all the numbers between like '5' or '3' or '7' ??
Also I can not get the part about correcting errors because it is not explained enough..

That is the assigned problem Prompt, thank you.
-Amy





Photos taken in space by the Galileo spacecraft are sent back to earth as a stream of numbers. each number represents a level of brightness. A large number represents a high brightness level, and a small number represents a low level. Your job is to take a matrix (a two-dimensional array) of the numbers and print it as a picture.
One approach to generating a picture is to print a dark character (such as #) when the brightness level is low, and to print a light character (such as a blank or a period) when the level is high. Unfortunately, errors in the transmission sometimes occur. Thus, your program should first attempt to find and correct these errors. Assume a value is in error if it differs by more than one from each of its four neighboring values, rounded to the nearest integer.
Example

|*|5 |*|
|4| 2 |5 |
|*|2 |*|


The 2 would be regarded as an error and would be given a corrected value of 5
Note that values on the corners or boundaries of the matrix have to be processed differently than the values on the interior. your program should print an image of the uncorrected picture and then an image of the corrected picture.


Sample Input File:


9897979989998997999688998997
8221211996712212299892171239
7915237789768181981969223198
9822128988971612997679352399
8712329897561231899289232687
9753221622717115837899191299
9712829273212382969829336198
7823271213171723973989123498
9815129966695162798989353297
6632819976793223693779212197
9527238878891372597699391798
6219121967812191292661223129
7976769565997866699798899787