When kilo is calculated, miles is undefined. You need to move the line containing kilo = miles*1.609; after the line std::in >> miles;
kilo
miles
kilo = miles*1.609;
std::in >> miles;