// A program to convert (input) kilometers into miles. // M. Cowan, September 10th, 2011 #include #include using namespace std; int main() { // Declare and initialize variables. float k = 0; // Prompt user for input (in kilometers). cout << "Please input the number of kilometers you wish to be converted " "into miles." << endl << endl; cin >> k; // Display # of kilometers in miles. cout << endl << k << " kilometers is " << (k * 0.621371192) << " miles." << endl << endl; /* Pause the system so the program window does not close until user inputs * a key. */ system("PAUSE"); return EXIT_SUCCESS; }