Write a program that given a 2D integer matrix (default value: 0) and a coordinate in the matrix, it sets all of the elements diagonal to the coordinate to a value of 1 (so that if you wrote it on a piece of paper there's an X with the coordinate at the center).
Sigiloso
I answered this with an ugly piece of code using four (very long) while loops that were more or less identical. Each loop was for one of the "coordinate regions" if we consider the coordinate as the origin of a x-y graph. (answer to question 2 has a better solution to this problem)