At Fixya.com, our trusted experts are meticulously vetted and possess extensive experience in their respective fields. Backed by a community of knowledgeable professionals, our platform ensures that the solutions provided are thoroughly researched and validated.
Write a Java application that prompts the user to enter a distance in kilometers and output the distance expressed in miles. One kilometers equals 0.62137 miles. Use DISTANCE as class name.
say 'Welcome to the class named DISTANCE'
pull kilometers junk
if kilometers = ' ' then exit
conversion = 0.62137
miles = kilometers * conversion
say kilometers 'Kilometers is' miles 'Miles.'
exit
- If you need clarification, ask it in the comment box above.
- Better answers use proper spelling and grammar.
- Provide details, support with references or personal experience.
Tell us some more! Your answer needs to include more details to help people.You can't post answers that contain an email address.Please enter a valid email address.The email address entered is already associated to an account.Login to postPlease use English characters only.
Tip: The max point reward for answering a question is 15.
×