matriz
public static void main(String[] args)
{
int[][] matriz = new int[3][3];
Vector v = new Vector();
for (int i = 0; i < matriz.length; i++)
{
matriz[i][i] = 1;
}
for (int i = 1; i < matriz.length; i++)
{
for (int j = 0; j < matriz.length - i; j++)
{
matriz[j][i+j] = 0;
v.add(matriz[j][i+j]);
}
}
for(int i = 0; i < matriz.length; i++) {
for(int j = 0; j < matriz[i].length; j++) {
System.out.print(matriz[i][j]);
}
System.out.println("");
}
}
-
Notifications
You must be signed in to change notification settings - Fork 1
analuizanunes/matriz
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
matriz
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published