From 987ad3e10c98ba118345d0d5200291f95ae21802 Mon Sep 17 00:00:00 2001 From: QSchweigert Date: Thu, 14 Sep 2023 10:53:35 -0700 Subject: [PATCH 1/2] Finished!! --- .idea/misc.xml | 2 +- src/GettingHotInHere.java | 8 ++++++++ src/MrRoboto.java | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index cf9abe6..0548357 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..e3e236c 100644 --- a/src/GettingHotInHere.java +++ b/src/GettingHotInHere.java @@ -10,5 +10,13 @@ public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("What is the temperature in °F: "); int number = scanner.nextInt(); + System.out.println(number+"°F"); + double y; + y = (number - 32.0) * 5.0 / 9.0; + System.out.println(y+"°C"); + double x = y +2.0; + int z = (int) y; + System.out.println(z+"°C"); + System.out.println("If it were 2°C warmer it would be "+ x +"°C"); } } diff --git a/src/MrRoboto.java b/src/MrRoboto.java index c576091..3fdad1d 100644 --- a/src/MrRoboto.java +++ b/src/MrRoboto.java @@ -14,6 +14,7 @@ public static void main(String[] args) { String domo = "Domo arigato "; System.out.print("My name is Mr. Roboto, are you Kilroy? "); - // Write your program here + String userAnswer = scanner.nextLine(); + System.out.print(domo + userAnswer); } } From c8b14272ce48c6e8863066bf15c88e3764d19251 Mon Sep 17 00:00:00 2001 From: QSchweigert Date: Thu, 14 Sep 2023 10:59:52 -0700 Subject: [PATCH 2/2] Finished!! --- src/GettingHotInHere.java | 4 ++-- src/MrRoboto.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/GettingHotInHere.java b/src/GettingHotInHere.java index e3e236c..6c8fcc6 100644 --- a/src/GettingHotInHere.java +++ b/src/GettingHotInHere.java @@ -15,8 +15,8 @@ public static void main(String[] args) { y = (number - 32.0) * 5.0 / 9.0; System.out.println(y+"°C"); double x = y +2.0; - int z = (int) y; - System.out.println(z+"°C"); + int f = (int) y; + System.out.println(f+"°C"); System.out.println("If it were 2°C warmer it would be "+ x +"°C"); } } diff --git a/src/MrRoboto.java b/src/MrRoboto.java index 3fdad1d..04ead24 100644 --- a/src/MrRoboto.java +++ b/src/MrRoboto.java @@ -14,7 +14,7 @@ public static void main(String[] args) { String domo = "Domo arigato "; System.out.print("My name is Mr. Roboto, are you Kilroy? "); - String userAnswer = scanner.nextLine(); - System.out.print(domo + userAnswer); + String userAns = scanner.nextLine(); + System.out.print(domo + userAns); } }