Saturday, August 13, 2022
Envato Elements
HomeCodingDart Program To Convert Temperature From Fahrenheit To Celsius.

Dart Program To Convert Temperature From Fahrenheit To Celsius.

Problem Statement

You are given a variable, Fahrenheit, which stores a temperature in degrees Fahrenheit. You have to create a variable, celsius, which converts the temperature stored in Fahrenheit to degrees Celsius.

To convert temperature from degrees Fahrenheit to degrees Celsius, you first need to subtract 32 from the temperature, then multiply it by 5, followed by a division by 9.

Input

The input is the variable Fahrenheit.
Fahrenheit has already been declared for you.

Output

The output will be the value assigned to celsius.

Example

Sample Input

50.0

Sample Output

10.0

Program

void main() {
	var fahrenheit, celsius;
  fahrenheit = 50.0;
  celsius = (fahrenheit - 32) * 5/9;
  {
    print(celsius);
  }
}

OUTPUT:

10.0
RELATED ARTICLES
- Advertisment - Domains + Hosting + Security

Most Popular

Recent Comments