Advertisement
Guest User

wtf

a guest
Jan 26th, 2015
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.74 KB | None | 0 0
  1. public static int[][] readMatrixPre(int[][] matrix){
  2.             int i=0, j=0;
  3.             File nameFile = new File("matrizes.txt");
  4.             Scanner toReadFile = new Scanner("matrizes.txt");
  5.             while(toReadFile.hasNextLine()){
  6.                 i++;
  7.                 while(toReadFile.hasNextInt()){
  8.                     j++;
  9.                     matrix[i][j] = toReadFile.nextInt();
  10.                 }toReadFile.nextLine();
  11.             }
  12.            
  13.            
  14.             toReadFile.close();
  15.             return matrix;
  16.         }
  17.         public static void writeMatrixIn(){}
  18.         public static void showMeMyDespair(int[][] matrix){
  19.             int i=0, j=0;
  20.             for(i = 0; i < matrix.length-1; i++ ){
  21.                 for(j = i+1; j < matrix.length; j++){
  22.                     out.print(matrix[i][j]);
  23.            
  24.                 }
  25.             }
  26.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement