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
1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions src/GettingHotInHere.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* @author Trevor Hartman
* @author MJ Fracess
*
* @since Version 1.0
*/
import java.util.Scanner;

public class GettingHotInHere {
Expand All @@ -10,5 +16,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");
double c = (number - 32) * (5.0/9.0);
System.out.printf("or %.3f°C\n", c);
int ci = (int) c;
System.out.printf("and also %d°C\n", ci);
String Y = "If it were 2°C warmer it would be: ";
System.out.printf("%s %.1f°C", Y, c+2);
}
}
11 changes: 10 additions & 1 deletion src/MrRoboto.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* @author Trevor Hartman
* @author MJ Fracess
*
* @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 @@ -14,6 +20,9 @@ public static void main(String[] args) {
String domo = "Domo arigato ";

System.out.print("My name is Mr. Roboto, are you Kilroy? ");
// Write your program here
String answer = scanner.nextLine();
System.out.println(domo + answer);


}
}