Computer Science, asked by tikritika986, 19 hours ago

WAP to input the temperature in in Celsius and convert it into Fahrenheit. If the temperature is more than 98.6 F then display “fever” otherwise “Normal”.

DO NOT USE BUFFERED READER
TO BE DONE IN BLUE J
WRONG ANSWER WILL BE REPORTED

Answers

Answered by leenath
1

Answer:

Explanation:

import java.io.*;

public class KboatTemperature

{

   public static void main(String args[]) throws IOException {

       

       InputStreamReader read = new InputStreamReader(System.in);

       BufferedReader in = new BufferedReader(read);

       

       System.out.print("Enter temperature in Celsius: ");

       double cel = Double.parseDouble(in.readLine());

       

       double far = 1.8 * cel + 32;

       

       if (far > 98.6)

           System.out.println("Fever");

       else

           System.out.println("Normal");

   }

}

Answered by khanarbaaz123123
4

Answer:

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”);

    }

Explanation:

please mark me as brilliant

Similar questions