// Allison Obourn // Displays changes in temperature based on a data file. import java.util.*; import java.io.*; public class Temperatures { public static void main(String[] args) throws FileNotFoundException { Scanner input = new Scanner(new File("weather.txt")); double first = input.nextDouble(); while(input.hasNext()) { if (input.hasNextDouble()) { double second = input.nextDouble(); System.out.printf("%.1f to %.1f, change = %.1f\n", first, second, (second - first)); first = second; } else { input.next(); } } } }