67 020
Assignments Done
99,3%
Successfully Done
In November 2018

Answer to Question #14685 in C++ for kk

Question #14685
Write a C++ program to convert a distance given in miles plus additional feet into kilometers. Use the following values (please, exactly these values – they're not exactly correct but I want your results to exactly match my results) to convert the distances: one mile is 5280 feet, one meter is 3.28 feet (this isn't exactly correct but don't worry about it), and one kilometer is 1000 meters.
Expert's answer
#include <math.h>
#include<iostream>
using namespace std;


int main()
{
& float mil,fe,a;
int i,j,k;
cout<<"Enter the distance in miles: ";
cin>>mil;
cout<<"Enter additional feet: ";
cin>>fe;
a=(mil*5280+fe)/3280;
cout<<"Distance in kilometers: "<<a<<"\n\n";;

&

system("PAUSE");
}

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

Submit
Privacy policy Terms and Conditions