Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. try {
  2.             Scanner sc = new Scanner(file);
  3.        
  4.             while (sc.hasNextLine()) {
  5.                 double masaLokomotive = sc.nextDouble();
  6.                 int vagoni = sc.nextInt();
  7.                 for (int i=0; i<vagoni; i++) {
  8.                     double volumen = sc.nextDouble();
  9.                     int tip = sc.nextInt();
  10.                     int tovor = sc.nextInt();
  11.                     for (int j=0; j<tovor; j++) {
  12.                         for (int k=0; k<5; k++) {
  13.                             String ime = sc.nextLine();
  14.                             int tipTovora = sc.nextInt();
  15.                             double volumenTovora = sc.nextDouble();
  16.                             double specG = sc.nextDouble();
  17.                             double specV = sc.nextDouble();
  18.                         }
  19.                     }
  20.                 }
  21.             }sc.close();
  22.         }catch (FileNotFoundException e) {
  23.             e.printStackTrace();
  24.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement