Connect with one of the following accounts


Please wait while we redirect...

Views: 837   

Following program shows you how to convert kilometers to miles.
In this program we get kilometers from user, once we get those we need to divide with 1.6 so that we get in miles

#include <iostream>
#include <math.h>

int main() {
    float kilometers;
    std::cout << "Please enter kilometers:";
    std::cin >> kilometers;
    float miles = kilometers / 1.6;
    std::cout << miles << " Miles";


Please enter kilometers: 52
32.5 Miles

On By

Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News