C++ programming:Task 1:
Photos taken in space by the Pathfinder 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 (two-dimensional array) of the numbers and print it as a negative picture. If the numbers received represent levels of brightness, then one approach to generating a picture is to print a dark character (like a $ ) when the bright level is low, print a medium character (like a *) when the level is medium, and print a light character (like a blank) when the level is high.
- ‘ $ ’ : when bright level is greater than or equal to 5.
- ‘ * ’ : bright level is between 2 and 4 (including 2 and 4).
- ' ': bright level is less than equal to
Input: A text file “imagedata.txt" that contains 20 X 20 integer array of brightness.
Output: The program should display the following output.
(please see attachment for more details)
Task 2:
2-dimensional Array (Check/Correct error pixels)
Unfortunately, errors in transmission sometimes occur. Thus your program should 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. Correct the erroneous value by giving it the average of its neighboring values,rounding it to the nearest integer.
(please see attachment for more details)
Thank you very much!!
261,329 students got unstuck by Course
Hero in the last week
Our Expert Tutors provide step by step solutions to help you excel in your courses