Last active
August 29, 2015 14:19
-
-
Save jonathan-irvin/a7edff4c77c5e74bc599 to your computer and use it in GitHub Desktop.
Convert feet to meters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Feet2Meters { | |
public static void main(String[] args) { | |
System.out.print("Enter distance in feet (ft): "); | |
Scanner input = new Scanner(System.in); | |
double feet; | |
feet = input.nextDouble(); | |
double meters = feet * 0.305; | |
System.out.println(feet + "ft is equal to " + meters + "m"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment