From 358efdd296b74531025367a9aba49e8c6bb87240 Mon Sep 17 00:00:00 2001 From: Kevin Date: Wed, 13 Sep 2023 13:16:27 -0700 Subject: [PATCH] lab 3 done --- .idea/misc.xml | 1 - src/GettingHotInHere.java | 7 +++++++ src/MrRoboto.java | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index cf9abe6..b95853c 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,3 @@ - diff --git a/src/GettingHotInHere.java b/src/GettingHotInHere.java index 7a5b209..2e0982d 100644 --- a/src/GettingHotInHere.java +++ b/src/GettingHotInHere.java @@ -10,5 +10,12 @@ 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"); + float Y = (number - 32) * 5 / 9; + int X = (number - 32) * 5 / 9; + int Z = (number - 32) * 5 / 9 + 2; + System.out.printf(Y + "°C \n"); + System.out.printf(X + "°C \n"); + System.out.printf("If it were 2°C warmer it would be " + Z + "°C \n"); } } diff --git a/src/MrRoboto.java b/src/MrRoboto.java index c576091..efc6fb1 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 message = scanner.nextLine(); + System.out.println(domo + message); } }