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.06% Correct | 30.94% Incorrect
Last Solution submitted on May 27, 2020

Solution Comments

Problem Recent Solvers96

Suggested Problems

More from this Author1

Problem Tags