Assignment #4 | Heaton Research

Assignment #4

Get the entire book!
Java for the Beginning Programmer

Write a program that will accept a number of miles from the user. This value should accept decimal places (i.e. 1.5 miles). Convert the number of miles into kilometers. Display the number of kilometers with decimal places (i.e. 3.445 kilometers). You do not have to round, display as many decimal places as Java gives you.

Note: 1 mile = 1.609344 kilometers.

Copyright 2005-2008 by Heaton Research, Inc.