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

  • Created by AM

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

77.11% Correct | 22.89% Incorrect
Last Solution submitted on Jul 12, 2020

Problem Comments

Problem Recent Solvers155

Suggested Problems

Problem Tags