Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;//Java standard input/output library. The *allows full access to everything within the library.
- import java.util.*;
- public class Main {
- public static void main(String[] args) throws IOException {
- double inches;//Declaration of inches and feet.
- double feet;
- BufferedReader BR= new BufferedReader(new InputStreamReader (System.in));//This allows for the system to read separate individual user inputted objects. Such as numbers.
- Scanner scanner= new Scanner(System.in);//This allows for the input of full length messages to be inputted from the user.
- System.out.println("Convert from inches to feet: ");
- System.out.println("Inches: ");
- inches=Double.parseDouble(BR.readLine());//Reads the individual number inputted by the user.
- feet= inches/12;//conversion rate from inches to feet is to divide by 12.
- System.out.println("Conversion from inches to feet: "+feet);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment