Computer Science, asked by kanchansadhup98oa3, 1 year ago

wap in Java to accept a temperature in celcius scale and print in its Fahrenheit equivalent with message

Answers

Answered by QGP
7
import java.util.Scanner;
public class Temperature
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);

        System.out.print("Enter Temperature in Degree Celsius: ");
        double tc = sc.nextDouble();
        
        double tf = 9*tc;
        tf = tf/5;
        tf += 32;
        
        System.out.println("Temperature in Degree Fahrenheit is: "+tf);
    }
}

QGP: Hope it helps.
QGP: Please mark it as brainliest if you like it
GoodAskerAbhi: try to give them only the logic.. code won't help them
Similar questions