diff --git a/.idea/misc.xml b/.idea/misc.xml index cf9abe6..501ce09 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..281780a 100644 --- a/src/GettingHotInHere.java +++ b/src/GettingHotInHere.java @@ -10,5 +10,17 @@ 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(); + // conversions + double a = number-32.0; + double b = a*5.0/9; + float c = (float) b; + float d = Math.round(c); + float e = c+2; + // outputs + System.out.println(number+"°F"); + System.out.println(c+"°C"); + System.out.println(d+"°C"); + System.out.printf("If it were 2°C warmer it would be: "+e+"°C"); + } } diff --git a/src/MrRoboto.java b/src/MrRoboto.java index c576091..0feaa0d 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 reply = scanner.nextLine(); + System.out.println(domo+reply); } }