summaryrefslogtreecommitdiffstats
path: root/Java/Fever.java
diff options
context:
space:
mode:
authormsglm <msglm@techchud.xyz>2023-01-14 05:31:48 -0600
committermsglm <msglm@techchud.xyz>2023-01-14 05:31:48 -0600
commit9d53d8857eaa1c9405894a88ca75bc4657e42f35 (patch)
treeeb1efc1d028b949dd83bb710c68be8eff58f26e7 /Java/Fever.java
downloadschool-code-master.tar.gz
school-code-master.tar.bz2
school-code-master.zip
Inital CommitHEADmaster
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