"if (miles == 1.609){
cout<<"1 mile." <<endl;
}
else{
cout <<"\nDistance is " << convert(miles) << " km." <<endl;
}
}while(miles > 0) ;
return(0);
} " What if you get rid of the If, and instead converting in Else, just Convert whatever the user inputs?
Besides, why are you using a loop?
I think you just need to do the procedure once, you could use a loop when asking the user if he'd like to convert a different measure...
Hmn?
-------
Mi-Re-Do-Re-Mi-Fa-Mi.