Assessment 2 2009 Medium

From Progzoo
Jump to: navigation, search

Medium problems These problems use png file image2.png Image2big.png

Black Pixels on Row 12

For row number 12 print the x coordinate of each black pixel.


[Font] [Default] [Show] [Resize] [History] [Profile]

Dark Columns

Print the column number for every column that includes more than 14 black pixels:

11 19 


[Font] [Default] [Show] [Resize] [History] [Profile]

Bounding Box

Print the details of the bounding box for the black pixels. That is: find the smallest rectangle that contains all of the black pixels, give the coordinates of the top left corner and the width and the height of the rectangle.

3 2 26 18


[Font] [Default] [Show] [Resize] [History] [Profile]

Longest Line

Find the longest horizontal line, print the coordinates of each end of the line.

6 2 21 2


[Font] [Default] [Show] [Resize] [History] [Profile]