PLEASE, use code tags, it makes reading your source easier.
http://www.cplusplus.com/articles/jEywvCM9/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <iostream>
#include <stdlib.h>
int main()
{
double C;
double F;
std::cout << "Value the temperature with Celcius: ";
std::cin >> C;
F = 1.8 * C + 32;
std::cout << "The temperature in Fahrenheit is " << F << std::endl;
}
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
double C;
double F;
cout << "Value the temperature with Celcius: ";
cin >> C;
F = 1.8 * C + 32;
cout << "The temperature in Fahrenheit is: " << F << endl;
}
What you did wrong is you wrote the f thing wrong you did
F = 1,8 * C + 32;
You have to do
F = 1.8 * C + 32;
Also I added
using namespace std;
So then you don't need to do the std:: thing.
Also I added
using namespace std;
So then you don't need to do the std:: thing.
That is actually a bad idea - Google to see why, there is plenty written on this site and on the internet.
What FurryGuy did is the right way of doing it, and you may notice that all the experienced people do it this as well - look at posts by JLBorges for example.
One final thing for the OP as well - always initialise your variables - even if you assign something to it on the next line. Not initialising things is a very big source of errors, not only for beginners - but also for some not so beginners.