Hello, I am very new to c++ programming and I a trying to create a program with a user defined function to convert Fahrenheit to Celcius. Here is what I have so far, but it does not run:
When I run this, I get an error that Celcius was not declared in the scope, even though I thought I had declared it at the top. Additionally, I am not sure if I should be using float or double. Any help or guidance on this would be appreciated! Thank you.Code://this program converts Fahrenheit to Celcius #include<iostream> using namespace std; int main() { float Fahrenheit, Celcius; cout << "Enter the temperature in Fahrenheit: "; cin >> Fahrenheit; Celcius = (5.0/9.0)*(Fahrenheit - 32); cout<<"The temperature in Celcius: " <<Celcius<<endl; return 0; }