Answers for "celsius to fahrenheit java program"

1

celsius to fahrenheit in java

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        // celsius -----> fahrenheit

        Scanner scanner = new Scanner(System.in);

        System.out.print("Enter temperature in degree celsius: ");
        float temperatureCelsius = scanner.nextFloat();

        float temperatureFahrenheit = (temperatureCelsius * 9/5) + 32;

        System.out.printf("\n%.2f C = %.2f F\n",temperatureCelsius, temperatureFahrenheit);
    }
}
Posted by: Guest on June-25-2021
0

java fahrenheit to celsius

celsius = ((Fahrenheit - 32)*5)/9;
Posted by: Guest on June-30-2021

Code answers related to "celsius to fahrenheit java program"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language