Txerrinko

MatrizPrueba

Mar 18th, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. package Ejercicio3;
  2.  
  3. import java.io.IOException;
  4.  
  5. public class MatrizCuadrada {
  6.  
  7. /**
  8. * @param args
  9. */
  10.  
  11. private int dim;
  12. private int matriz[][];
  13.  
  14. MatrizCuadrada (int pdim){
  15. dim=pdim;
  16. matriz = new int [4] [4];
  17.  
  18. }
  19. /*
  20. public void cargar (int matriz [][]) throws IOException{
  21.  
  22. int num , i , j;
  23.  
  24. for (i=0;i<matriz.length;i++){
  25.  
  26. for (j=0;j<matriz.length;i++){
  27.  
  28. System.out.println("Introduce numeros");
  29. num=Consola.leeInt();
  30.  
  31.  
  32.  
  33.  
  34. }
  35.  
  36.  
  37. public void cargarIdentidad (int matriz [][]) {
  38.  
  39. for ( i=0 ; i <matriz.length;i++)
  40. {
  41.  
  42. for (int j=0; j<matriz.length;j++){
  43.  
  44. if (i==j){
  45.  
  46. t[i][j]=1;
  47. }
  48. else {
  49.  
  50. t[i][j]=0;
  51. }
  52.  
  53. }
  54.  
  55. }
  56.  
  57.  
  58.  
  59.  
  60. }
  61.  
  62.  
  63. }
  64.  
  65.  
  66. }
  67.  
  68.  
  69.  
  70. }
  71.  
  72.  
  73.  
  74. */
  75.  
  76.  
  77.  
  78.  
  79. public static void main(String[] args) {
  80. // TODO Auto-generated method stub
  81.  
  82. }
  83.  
  84. }
Advertisement
Add Comment
Please, Sign In to add comment