Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.util.Scanner;
- public class FreeShirts
- {
- public static void main(String[] args) throws IOException //throw-n provides exception if file not found
- {
- //open file for reading, must create file object first
- File file = new File("C:\\Users\\mitcpale842\\Desktop\\ECOO_fileReading\\DATA11.txt");
- // on windows must use two backslashes
- Scanner inputFile = new Scanner(file);
- int b=0,a=0,v=0;
- while (inputFile.hasNext())
- {
- a = inputFile.nextInt();
- b = inputFile.nextInt();
- v = inputFile.nextInt();
- inputFile.nextLine();
- String sentence = inputFile.nextLine();
- String[] myStringArray = sentence.split(" ");
- for(int i = 0; i < D; i++)
- {
- N--;
- for(int x = 0; x < a1.length; x++)
- {
- N++;
- }
- if(n == 0)
- {
- int wash++;
- }
- }
- }
- inputFile.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement