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
1
Expert's answer
2012-08-30T09:52:34-0400
#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 the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS