Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/GettingHotInHere.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
/**
*
* @author Trevor Hartman
* @author Cassandra Portlock
*
* @since Version 1.0
*
*/
import java.util.Scanner;

public class GettingHotInHere {
/**
* Teaching Mr. Roboto how to listen to us.
*
* @param args Command line arguments [The source file path, The target file path, ...]
**/
public static void main(String[] args) {
// The instantiation code for a Scanner instance.
Scanner scanner = new Scanner(System.in);
System.out.print("What is the temperature in °F: ");
int number = scanner.nextInt();
int n = scanner.nextInt();
double c = ((n - 32.0) * (5.0 / 9.0));
int C = (int) c;

System.out.println(n + "°F");
System.out.println(c + "°C");
System.out.println(C + "°C");
System.out.println("If it were 2°C warmer it would be: " + (2 + c) + "°C");

}
}

10 changes: 10 additions & 0 deletions src/MrRoboto.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
*
* @author Trevor Hartman
* @author Cassandra Portlock
*
* @since Version 1.0
*
*/
// Import the Scanner tool used for reading (All external packages/libraries/apis are imported similarly this)
import java.util.Scanner;

Expand All @@ -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 response = scanner.nextLine();
System.out.println(domo +response);
}
}