Advertisement
Guest User

Untitled

a guest
Oct 28th, 2014
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static void lineAverage(){
  2. // File input
  3. FileReader IN = new FileReader();
  4. scanner s = new Scanner();
  5.  
  6. // Variables
  7. int x;
  8. int y;
  9.  
  10. while ( s.hasNextLine())
  11. {
  12.   int x = s.nextInt();
  13.   int y = s.nextInt();
  14.  
  15.    //Print the average of each line
  16.    System.OUT.println("Average: " (x+y) / 2);
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement