write a C++ plus program to enter fahrenheit temperature. Convert Fahrenheit into Celsius and display them
Answers
Answered by
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
Math,
1 month ago
Math,
1 month ago
Math,
10 months ago
Political Science,
10 months ago
Hindi,
10 months ago