Skip to content

Instantly share code, notes, and snippets.

@pepet96
Created November 6, 2013 04:47
Show Gist options
  • Save pepet96/7331065 to your computer and use it in GitHub Desktop.
Save pepet96/7331065 to your computer and use it in GitHub Desktop.
mport java.util.Scanner;
import java.io.*;
class Fever {
public static void main (String [] args) throws IOException {
Scanner input = new Scanner(System.in);
double temp;
System.out.println("This program will determine if you have a fever based on your temperature. \nPlease enter your temperature in Centigrades: ");
temp = input.nextDouble();
if (temp >= 39)
System.out.println("You have a fever, please try to lower your temperature to avoid problems and visit a doctor");
else if (temp >= 35 )
System.out.println("Your temperature is normal, no need for medical attention");
else if (temp < 35)
System.out.println("Your temperature is too low, please increase your temperature and visit a doctor");
}
}
@edolopez
Copy link

.java en los nombres de gists por favor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment