/**
 * Exercise 1.12 from the book Introduction to Java Programming (10th).
 *  
 * @author Henrik Samuelsson, henrik.samuelsson(at)gmail.com
 */

public class Exercise_01_12 {
	
	public static void main(String[] args) {
		System.out.println( ( 24.0 / 1.6 ) 					// km
				/ ( 1 + 40.0 / 60.0 + 35.0 / 3600.0 ) );	// hours
	}

}

/**
 * Exercise 1.12 from the book Introduction to Java Programming (10th).
 *  
 * @author Henrik Samuelsson, henrik.samuelsson(at)gmail.com
 */

public class Exercise_01_12 {
	
	public static void main(String[] args) {
		System.out.println( ( 24.0 / 1.6 )                  // km
				/ ( 1 + 40.0 / 60.0 + 35.0 / 3600.0 ) );    // hours
	}

}

Update Exercise_01_12.java