Computer Science, asked by shahanaparveen639, 4 months ago

3. Write a Java program to input the temperature in Celsius and convert it into Fahrenheit. If
the temperature is more th
an 98.6 F then display "Fever" otherwise "Normal".​

Answers

Answered by udayagrawal49
5

Answer: The required Java program is :-

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

    Scanner scan = new Scanner(System.in);

    System.out.print("Enter the temperature (in °C) : ");

    double tempC = scan.nextDouble();

    scan.close();

    double tempF = (1.8*tempC)+32;

    if(tempF > 98.6) {

        System.out.println("Fever");

    }

    else {

        System.out.println("Normal");

    }

    }

}

Please mark it as Brainliest.

Similar questions