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.

9 changes: 8 additions & 1 deletion src/GettingHotInHere.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ 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 fahrenheit = scanner.nextInt();
System.out.println(fahrenheit+"°F");
int celsius = (fahrenheit-32) * 5 / 9;
int newCelsius = celsius + 2;
System.out.printf("%f°C \n", (double) celsius);
System.out.printf("%d°C \n", celsius);
System.out.printf("If it were 2°C warmer it would be: "+"%f°C", (double) newCelsius);

}
}
3 changes: 2 additions & 1 deletion src/MrRoboto.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Import the Scanner tool used for reading (All external packages/libraries/apis are imported similarly this)
import java.util.Scanner;

public class MrRoboto {
/**
* Teaching Mr. Roboto how to listen to us.
Expand All @@ -15,5 +14,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 );
}
}