hi, I was hoping someone could help me. I've been trying to do this for the past hour with no luck.
basically i'm trying to make a Celcius to Fahrenheit converter. So far, the converter works fine, except for the fact that I cant get it to display 2 decimal places when I get the conversion answer...
I've tried looking around everywhere on multiple sites and guides for precision setting, but they dont work...
what am I doing wrong? Please help...
// mytemp.cpp
#include <iostream>
using namespace std;
int main ()
{
int c;
cout << "Celcius: ";
cin >> c;
cout.setf(ios::fixed);
cout << "Fahrenheit: " << ((c*9)/5)+32 << '\n';
return 0;
}