Computer Science, asked by pirates817, 6 months ago

Write A Program In Java Take Celsius As Input And Print Equivalent Fahrenheit

Please answer correctly very important ​

Answers

Answered by saumitraverma04
2

public class Main

{  

  public static void main (String args[])  

   { float Fahrenheit, Celsius;  

         Celsius= 13;  

         Fahrenheit =((Celsius*9)/5)+32;  

         System.out.println("Temperature in Fahrenheit is: "+Fahrenheit);  

}}

Please mark as brainlyest if helpful  

Answered by udayagrawal49
1

Answer:

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

 try{

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

  Scanner scan = new Scanner(System.in);

  double c = scan.nextDouble();

  scan.close();

  double f = ((c*9)/5)+32;

  System.out.println(c+" °C in Fahrenheit is "+f+" F");

 }

 catch (Exception e) {

  System.out.println("Some error occured");

 }

}

}

Please mark it as Brainliest.

Similar questions