diff --git a/.idea/misc.xml b/.idea/misc.xml index cf9abe6..2e1c410 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/src/GettingHotInHere.java b/src/GettingHotInHere.java index 7a5b209..92c601f 100644 --- a/src/GettingHotInHere.java +++ b/src/GettingHotInHere.java @@ -9,6 +9,13 @@ public static void main(String[] args) { // The instantiation code for a Scanner instance. Scanner scanner = new Scanner(System.in); System.out.print("What is the temperature in °F: "); - int number = scanner.nextInt(); + int number = scanner.nextInt(); // gets the input + float celsius = (number-32)*5/9; //converts to celsius + int celsiusInt = Math.round(celsius); //converts floating type to integer to drop the unecessary zeros. + float warmer = celsius+2; //calculates for "If warmer" output + System.out.println(number+"°F"); //the following outs display all that we've calculated + System.out.println(celsius+"°C"); + System.out.println(celsiusInt+"°C"); + System.out.println("If it were two degree's warmer it would be: " + warmer +"°C"); } } diff --git a/src/MrRoboto.java b/src/MrRoboto.java index c576091..c318ddf 100644 --- a/src/MrRoboto.java +++ b/src/MrRoboto.java @@ -13,7 +13,11 @@ public static void main(String[] args) { // Concatenate the user response to this String. String domo = "Domo arigato "; - System.out.print("My name is Mr. Roboto, are you Kilroy? "); + System.out.print("My name is Mr. Roboto, are you Kilroy? \n"); // Write your program here + + String userName = scanner.nextLine(); //waits for input + + System.out.print(domo + userName); } }