Answer to Question #13783 in C++ for shalenee

Question #13783
(Conversion from miles to kilometers) Write a program that displays the following table (note that 1 mile is 1.609 kilometers): Miles Kilometers 1 1.609 2 3.218 ... 9 14.481 10 16.090
Expert's answer
#include <iostream>
#include <conio.h>
#include <math.h>

using namespace std;
//Main function
int main()
{
cout<<"Miles Kilometers";

for(int i=1;i<=10;i++){
cout<<"
"<<i<<" "<<i*1.609;
}
getch();
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS
paypal