Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- Scanner sc = new Scanner(file);
- while (sc.hasNextLine()) {
- double masaLokomotive = sc.nextDouble();
- int vagoni = sc.nextInt();
- for (int i=0; i<vagoni; i++) {
- double volumen = sc.nextDouble();
- int tip = sc.nextInt();
- int tovor = sc.nextInt();
- for (int j=0; j<tovor; j++) {
- for (int k=0; k<5; k++) {
- String ime = sc.nextLine();
- int tipTovora = sc.nextInt();
- double volumenTovora = sc.nextDouble();
- double specG = sc.nextDouble();
- double specV = sc.nextDouble();
- }
- }
- }
- }sc.close();
- }catch (FileNotFoundException e) {
- e.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement