Starting git repo for working on files

This commit is contained in:
sulzlep
2024-07-13 12:44:25 +02:00
commit d45a2994e8
20 changed files with 185 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
public class BandMatrix
{
public static void main(String[] args)
{
int n = Integer.parseInt(args[0]);
int width = Integer.parseInt(args[1]);
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if ((j - i <= width) && (i -j <= width))
{
System.out.print(" * ");
}
else
{
System.out.print(" 0 ");
}
}
System.out.println("\n");
}
}
}