I'm trying to do this on my own, just started taking a class and need help. Here is the code and the error msg
#include <iostream.h>
double celsius_to_fahrenheit(double celsius);
double get_celsius();
int main()
{
double fahrenheit;
double celsius;
double celsius_in;
celsius = get_celsius();
cout << "Enter the temprature in Celsius: ";
fahrenheit = celsius_to_fahrenheit(celsius);
cout << celsius << " C = " << fahrenheit << " F\n";
return 0;
}
double celsius_to_fahrenheit(double celsius)
{
return(celsius * (9.0/5.0) + 32.0);
}
double get_celcius()
{
double celcius_in;
cout << "Enter the temperature in Celsius: ";
cin >> celsius_in;
return celsius_in;
}
: warning C4101: 'celsius_in' : unreferenced local variable
: error C2065: 'celsius_in' : undeclared identifier
Error executing cl.exe.
ctof.obj - 1 error(s), 1 warning(s)
Any help would be great!
Spelling Spelling Spelling Thank you that worked next time before I post I will check and triple check my spelling.
K.S.