jeffheaton's picture
in
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 - 2012 by Heaton Research, Inc.. Heaton Research™ and Encog™ are trademarks of Heaton Research. Click here for copyright, license and trademark information.