Program to Convert Km / hr to miles / hr and vice versa | Cpp program for conversion of kmph to mph and vice versa ; Function to convert kmph to mph ; Function to convert mph to kmph ; Driver code to check the above function
#include <bits/stdc++.h> NEW_LINE using namespace std ; double kmphTOmph ( double kmph ) { return 0.6214 * kmph ; } double mphTOkmph ( double mph ) { return mph * 1.60934 ; } int main ( ) { double kmph = 150 ; double mph = 100 ; cout << " the ▁ speed ▁ in ▁ mph ▁ is ▁ " << kmphTOmph ( kmph ) << endl ; cout << " the ▁ speed ▁ in ▁ kmph ▁ is ▁ " << mphTOkmph ( mph ) ; return 0 ; }