Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void lineAverage(){
- // File input
- FileReader IN = new FileReader();
- scanner s = new Scanner();
- // Variables
- int x;
- int y;
- while ( s.hasNextLine())
- {
- int x = s.nextInt();
- int y = s.nextInt();
- //Print the average of each line
- System.OUT.println("Average: " (x+y) / 2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement