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
Hindi,
26 days ago
Math,
26 days ago
Math,
8 months ago
Political Science,
8 months ago
Hindi,
8 months ago