Home Java Java-tips Examples-introductory Dialog Programming: Convert Miles to Kilometers

Ask Questions?

View Latest Questions

Advertisement


 
 

Programming: Convert Miles to Kilometers
Posted on: July 26, 2006 at 12:00 AM
Write a program which inputs miles (a double) and displays the equivalent number of kilometers.

Java Notes

Programming: Convert Miles to Kilometers

Name ________________________________

Description

Write a program which inputs miles (a double) and displays the equivalent number of kilometers. Assume there are 1.61 kilometers in a mile. After processing one value, go back and get the next value. Print an error message if the input value is negative.

Advertisement


DMCA.com