Conversion - "Miles you wish to...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.util.Scanner; class Conversion { public static void main (String[] args) { final float Conversion_Ratio = 1.60935f; float Miles, Kilometers; Scanner scan = new Scanner(; System.out.println ("This Program is designed to" + "convert from Miles to Kilometers"); System.out.println ("Please enter in the number of" +
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: "Miles you wish to convert:"); Miles = scan.nextFloat(); Kilometers = Miles * Conversion_Ratio ; System.out.print("The number of Kilometers in " + Miles); System.out.print(" miles, is " + Kilometers); System.out.print(" Kilometers."); } }...
View Full Document

Ask a homework question - tutors are online