/BandMatrix

Takes two integer command-line arguments n and width and prints an n-by-n pattern, with a zero (0) for each element whose distance from the main diagonal is strictly more than width, and an asterisk (*) for each entry that is not, and two spaces between each 0 or *.

Primary LanguageJava

BandMatrix

Takes two integer command-line arguments n and width and prints an n-by-n pattern, with a zero (0) for each element whose distance from the main diagonal is strictly more than width, and an asterisk (*) for each entry that is not, and two spaces between each 0 or *.