summaryrefslogtreecommitdiffstats
path: root/Java/Fever.java
diff options
context:
space:
mode:
Diffstat (limited to 'Java/Fever.java')
-rw-r--r--Java/Fever.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/Java/Fever.java b/Java/Fever.java
new file mode 100644
index 0000000..ee558fe
--- /dev/null
+++ b/Java/Fever.java
@@ -0,0 +1,24 @@
+//there is absolutely no reason for the input to be a double. No one will be inputting any decimal past the 3, so there is no reason to waste memory on that. Float > Double in this case if you value effective programming.
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+
+class Fever {
+ public static void main(String[] args) throws java.io.IOException {
+ float temp;
+ System.out.println("input temp:");
+ BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
+ temp = Float.parseFloat(input.readLine());
+ if (temp > 98.6){
+ System.out.println("you have a fever.");
+ } else {
+ System.out.println("you are not running a fever.");
+ }
+
+
+
+
+
+ }
+}
+
+//By msglm; Licensed under the AGPL v3