hey
I've an array filled with "."s representing empty sapces, and "X"s non-empty sapces. I've to draw a triangle, for given hieght, width, starting row&col and cricle for given diameter.
For example if you have followings:
. . . . . . . . . .
. . . . x . . . . .
. . . x x x . . . .
. . x x x x x . . .
. x x x x x x x . .
. . . . . . . . . .
. . . . . . . . .
. . x x x . . . .
. x x x x x . . .
x x x x x x x . .
x x x x x x x . .
x x x x x x x . .
. x x x x x . . .
. . x x x . . . .
The first picture shows triangle with height = 4, width = 7 and starting row = 1 and col = 1, means the first "X" on last line has col = 1 and "X" on first line has row = 1. The second picture shows a circle, with diameter 7, start row = 1 and start col = 0.
For triangle, i tried different methods, but it doesn't work for all the cases and for circle i've no idea. Any help, hints, suggestion would be really apperciated, tons of thanks in advance!