diff --git a/src/GettingHotInHere.java b/src/GettingHotInHere.java index 7a5b209..749d610 100644 --- a/src/GettingHotInHere.java +++ b/src/GettingHotInHere.java @@ -1,3 +1,11 @@ +/** + * + * @author Trevor Hartman + * @author Angelina Perez + * + * @since Version 1.0 + * + */ import java.util.Scanner; public class GettingHotInHere { @@ -10,5 +18,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(); + + // Performing the temperature conversion + double celsius = (number - 32) * 5.0 / 9.0; + + // the results from the conversion + System.out.println(number + "°F"); + System.out.printf("%.6f°C%n", celsius); + System.out.println((int) celsius + "°C"); + + //results if the temperature were 2°C warmer + double warmerCelsius = celsius + 2; + System.out.println("If it were 2°C warmer it would be: " + String.format("%.6f°C", warmerCelsius)); } } diff --git a/src/MrRoboto.java b/src/MrRoboto.java index c576091..da87093 100644 --- a/src/MrRoboto.java +++ b/src/MrRoboto.java @@ -1,3 +1,11 @@ +/** + * + * @author Trevor Hartman + * @author Angelina Perez + * + * @since Version 1.0 + * + */ // Import the Scanner tool used for reading (All external packages/libraries/apis are imported similarly this) import java.util.Scanner; @@ -15,5 +23,7 @@ public static void main(String[] args) { System.out.print("My name is Mr. Roboto, are you Kilroy? "); // Write your program here + String line = scanner.nextLine(); + System.out.println(domo+line); } }