A solution to the task "Identity Matrix" at rosettacode.org
Task
Build an identity matrix of a size known at run-time.
An identity matrix is a square matrix of size n × n, where the diagonal elements are all 1s (ones), and all the other elements are all 0s (zeroes).
https://rosettacode.org/wiki/Identity...