Connect with one of the following accounts


Please wait while we redirect...

Views: 1352   

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

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

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


Please enter miles: 25
40 Kilometers

On By

Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News