C++ Program to Convert Kilometers to Miles














































C++ Program to Convert Kilometers to Miles




#include<iostream> using namespace std; // Function to Convert Kilometer to Miles void toMiles(int n) { int Miles; Miles = n/1.609 ; cout<< n << " Kilometers " << " = "<< Miles << " Miles "; } int main() { // Kilometer int n = 14; toMiles(n); return 0; }

OUTPUT : 14 Kilometers = 8 Miles

Comments