14 March 2015

Matrix Challenge

  • Write a console application to display a square matrix of zeros and ones.
  • The matrix should be all zeros, except for the top-left to bottom-right diagonal which should be ones.
  • The program should prompt the user for the size of the matrix to display.
  • The matrix will be square.
  • Do not worry about handling invalid input.
100000  
010000  
001000  
000100  
000010  
000001  


blog comments powered by Disqus