Solution Found!
Write a program that reads a file containing two columns of floating-point num
Chapter 8, Problem P8.4(choose chapter or problem)
QUESTION:
Write a program that reads a file containing two columns of floating-point num bers.Prompt the user for the file name. Print the average of each column.
Questions & Answers
QUESTION:
Write a program that reads a file containing two columns of floating-point num bers.Prompt the user for the file name. Print the average of each column.
ANSWER:Step 1 of 2
If we expect double output, then it's better to parse the numbers to double, not int.
You can use String.split to split the line on white spaces and then parse the doubles: