Computer Science, asked by deepakagrawal0641, 3 months ago

write a C++ plus program to enter fahrenheit temperature. Convert Fahrenheit into Celsius and display them​

Answers

Answered by bagulvaishu724
0

Answer:

include <iostream>

double fahrenheitToCelsius(double fahrenheit)

{

double celsius;

celsius = (fahrenheit - 32.0) * 5.0 / 9.0;

return celsius;

}

int main()

{

double fahrenheit;

std::cout << "Enter temperature in fahrenheit (in degrees) ";

std::cin >> fahrenheit;

std::cout << "Temperature in Celsius (in degrees) = "

<< fahrenheitToCelsius(fahrenheit) <<std::endl;

getch( );

}

Similar questions