summaryrefslogtreecommitdiffstats
path: root/Java/Fever.java
blob: ee558fee8c1c1caa091da9601e35e8a4aa867e2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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