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.34% Correct | 30.66% Incorrect
Last Solution submitted on Feb 10, 2020

Solution Comments

Problem Recent Solvers58

Suggested Problems

More from this Author1

Problem Tags