write a program in java to find the temperature in Fahrenheit when temperature is given in celsius
Answers
Answered by
0
Answer:
import java.util.Scanner;
public class temperature
{
public static void main (String args[])
{
float Fahrenheit, Celsius;
Scanner sc=new Scanner(System.in);
System.out.println("Enter temprature in celsius:");
Celsius= sc.nextFloat ();
Fahrenheit =((Celsius*9)/5)+32;
System.out.println("Temperature in Fahrenheit is: "+Fahrenheit);
}}
plz mark brainliest.
Answered by
17
This program is solved using Java .
Solution :-
class Temperature
{
void display(double c)
{
double f=(9*c/5+32);
System.out.println("Temperature in Fahrenheit="+f);
} }
_________________________________
Output :-
- See I have attached an output of 37°C to Fahrenheit
Attachments:
Similar questions