Cody

Problem 42456. Create an array (n,n) where only diagonal elements are '1' and others are '0'

Create an array (n,n) where only diagonal elements are '1' and others are '0'

EX: n = 3; then Resultant array would be [ 1 0 1

                                0 1 0
                                1 0 1 ]                                 

Solution Stats

69.12% Correct | 30.88% Incorrect
Last solution submitted on Oct 18, 2019

Solution Comments

Problem Recent Solvers57

Suggested Problems

More from this Author1

Problem Tags