I am trying to write a program that can take two different kind of inputs for units but the output must always be in kg. I am able to run the code but the if statement never takes place.
[code]
double Weight;
string UNITS;
cout << "Enter Weight and Units, separated by a space:";
cin >> Weight;
cin >> UNITS;
if (UNITS == "g")
Weight / 1000 ;
cout << "your weight is " << Weight << "in kg.";