answersLogoWhite

0


Best Answer

Multiply miles by 1.609344 to get kilometres:

double mile2km (double miles) { return miles * 1.609344; }

Multiply kilometres by 0.62137119 to get miles:

double km2mile (double km) { return km * 0.62137119; }

User Avatar

Wiki User

6y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the algorithm to convert miles to kilometers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Algorithm to convert a number representing radix r1 to r2?

algorithm to convert a number representing radix r1 to radix r2


How do you create an algorithm to convert a persons weight from pounds to kilograms?

hisince1 pound = 0.45359237 kilogramssoweight_in_kilo = weight_in_pounds * 0.45359237


What is c plus plus program use to convert algorithm in to c plus plus program?

You can't convert an algorithm into code. That is the job of the programmer, not the language. Algorithm's are expressed in plain-English and typically use pseudocode to broadly demonstrate the implementation of the algorithm. However, it is the programmer's job to convert these algorithms into working code. Pseudocode isn't a programming language as such, but it uses structures and statements that are familiar to any programmer and can be easily translated into any language. However, pseudocode is not a standard so there are many different ways to present pseudocode to the programmer. Moreover, pseudocode is generalised and is far too generic to be converted directly into any one language, never mind C++, which can take advantage of the underlying hardware to produce more efficient algorithms than would otherwise be implied by the pseudocode alone. Hence the need for plain-English algorithms in conjunction with the pseudocode. Programmer's can process all this information far more easily than any computer can. Even if you could program a converter for one algorithm, there's no guarantee it would work for any other algorithm. The time spent programming an algorithm converter would be far better spent simply translating the algorithm yourself.


What is algorithm to write algorithm to the program to access a pointer variable in structure?

Here is the algorithm of the algorithm to write an algorithm to access a pointer in a variable. Algorithmically.name_of_the_structure dot name_of_the _field,eg:mystruct.pointerfield


Which algorithm is more efficient lamport bakery algorithm or black and white bakery algorithm?

Black and White bakery algorithm is more efficient.

Related questions

What method would you use to convert 10 miles to kilometers?

Use this equation to convert miles to kilometers: miles x 1.60934 = kilometers


How do you convert miles in the customary US system to kilometers?

To convert miles to kilometers, multiply by 1.61 (a kilometer is about 0.62 miles).


Convert 660 miles to kilometers?

660 miles = 1,062.16704 kilometers


Convert 592 kilometers to miles?

592 kilometers = 367.851746 miles


How do you convert 1.2 kilometers into miles?

1.2 kilometers=0.745645431 miles


How many kilometers are in 6000 miles?

You can convert distance from miles to kilometers by just multiplying the number of miles with 1.6 . Likewise you can convert kilometers to miles by just multiplying the number of kilometers by 0.62 . So, in this case the answer is 9655.6 kilometers.


How many kilometers is 3108 miles?

You can convert distance from miles to kilometers by just multiplying the number of miles with 1.6 . Likewise you can convert kilometers to miles by just multiplying the number of kilometers by 0.62 . So, in this case the answer is 5001.6 kilometers.


How many kilometers is 255.36 miles?

You can convert distance from miles to kilometers by just multiplying the number of miles with 1.6 . Likewise you can convert kilometers to miles by just multiplying the number of kilometers by 0.62 . So, in this case the answer is 411 kilometers.


How many kilometers is 2413 miles?

You can convert distance from miles to kilometers by just multiplying the number of miles with 1.6 . Likewise you can convert kilometers to miles by just multiplying the number of kilometers by 0.62 . So, in this case the answer is 3883.1 kilometers.


How many kilometers is 2340 miles?

You can convert distance from miles to kilometers by just multiplying the number of miles with 1.6 . Likewise you can convert kilometers to miles by just multiplying the number of kilometers by 0.62 . So, in this case the answer is 3765.7 kilometers.


How many miles is 965 kilometers?

You can convert distance from miles to kilometers by just multiplying the number of miles with 1.6 . Likewise you can convert kilometers to miles by just multiplying the number of kilometers by 0.62 . So, in this case the answer is 599.651 miles.


How many miles are in 347 kilometers?

You can convert distance from miles to kilometers by just multiplying the number of miles with 1.6 . Likewise you can convert kilometers to miles by just multiplying the number of kilometers by 0.62 . So, in this case the answer is 215.62 miles.