Problem 42691. Matrix of almost all zeros, except for main diagonal

Created by AM in Community

Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewhere.

Solution Stats

78.61% Correct | 21.39% Incorrect
Last solution submitted on Apr 10, 2019

Problem Comments