Published
- 1 min read
C++ Kilometers Per Hour to Miles Per Hour Conversion
The solution for this is noted below
C++ Kilometers Per Hour to Miles Per Hour Conversion
Solution
const float A = 1.609344;
float k, mph;
cout << "Input the distance in Kilometer: ";
cin >> k;
mph = (k / A);
cout << "The result is " << mph << " miles per hour" << endl;
Try other methods by searching on the site. That is if this doesn’t work