Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 291 Bytes

README.md

File metadata and controls

21 lines (17 loc) · 291 Bytes

Identity Matrix

Can you build a function that prints an identity matrix, given the identity matrix size?

Examples:

Input  : 2
Output : 
         1 0
         0 1
Input  :  4
Output : 
         1 0 0 0
         0 1 0 0
         0 0 1 0
         0 0 0 1