From 4302185e27360c5a9e21ca3a987b54b5e196ddac Mon Sep 17 00:00:00 2001 From: miakalarose Date: Sat, 30 Sep 2023 16:46:02 -0700 Subject: [PATCH] Finished Lab-003 --- .idea/misc.xml | 2 +- src/GettingHotInHere.java | 8 ++++++++ src/MrRoboto.java | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index cf9abe6..cbbff6a 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..738acac 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(); + int n = number-32; + double u = 5.0 / 9.0; + int p = (int) (n*u); + float l = (float) (p); + System.out.println(number + "°F"); + System.out.println(l + "°C"); + System.out.println(p + "°C"); + System.out.println("If it were 2°C warmer it would be: " + (2+l) + "°C"); } } diff --git a/src/MrRoboto.java b/src/MrRoboto.java index c576091..0569025 100644 --- a/src/MrRoboto.java +++ b/src/MrRoboto.java @@ -15,5 +15,7 @@ public static void main(String[] args) { System.out.print("My name is Mr. Roboto, are you Kilroy? "); // Write your program here + String response = scanner.nextLine(); + System.out.print(response + " " + domo + response); } }