Temp conversion program

Hi,

I want to write a program which asks me to enter temperature with unit, like 32F and then converts it to C, and if it's 100C then converts it to F.
But I don't know who integer variable should be assigned for alphanumeric value.

Thank you!
1
2
3
4
5
6
int temp;
char scale;
if(std::cin >> temp >> scale)
{
    std::cout << "Your temperature is in " << scale << " and has magnitude " << temp << std::endl;
}
Topic archived. No new replies allowed.