< previous page page_769 next page >

Page 769
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
Sample Input:
0   3  4   0  0  0   6  8
5  13  6   0  0  0   2  3
2   6  2   7  3  0  10  0
0   0  4  15  4  1   6  0
0   0  7  12  6  9  10  4
5   0  6  10  6  4   8  0
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
A star is probably located in the area covered by the array element a [i][j] if the following is the case:
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
(a[i][j] + sum of the 4 surrounding intensities) / 5.0 > 6.0
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
Ignore possible stars along the edges of the array.
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
Input:
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
A title
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
An array of intensities
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
Output:
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
The desired output is a star map containing asterisks where you have found a star and blanks elsewhere. For example,
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
- - - - - - - - - - - - - - - - - - - - - - - - -
:
:
:       *
:
:               *
:
:               *       *     *
:
:
3e26ecb1b6ac508ae10a0e39d2fb98b2.gif
Print two blanks for the no star case. The presence of a star should be indicated by a blank, followed by an asterisk. The chart should have a border and be labeled with the title.

 
< previous page page_769 next page >