#include <iostream>
using namespace std;
int main()
{
string feet;
string conversion;
float value;
cout << "What's you current unit?" ;
cin >> conversion;
if (value == feet) { //the program only runs this part and doesnt ask for input, just gives 0 as a value
cout << "Enter a number: ";
cin >> value;
value = value/3.281;
cout << value << "meters";
}
else {
cout<<"Enter a number: ";
cin>> value;
value = value*3.281;
cout << value << "feet";
}
return 0;
}
I left my problem in the comment above. I think I'm missing something, cause its not running completely and for some reason its giving me a value of 0.