Get the answers you need at Westonci.ca, where our expert community is dedicated to providing you with accurate information. Our Q&A platform offers a seamless experience for finding reliable answers from experts in various disciplines. Get quick and reliable solutions to your questions from a community of experienced experts on our platform.

Write a program to convert kilometers/hr to miles/hr. The program should produce a table of 10 conversions, starting at 60 km/hr and incremented by 5 km/hr. The display should have appropriate headings and list each km/hr and its equivalent miles/hr value. Use the relationship that 1 kilometer = 0.6241 miles. Implement this program using the FOR loop. Sample output is given below: write a c++ programe Page 1 of 2 I KM per hour Miles per hour 60 37.4460 65 40.5665 70 43.6870 46.8075 80 49.9288 85 53.0485 90 56.1690 95 59.2895 100 62.4100 105 65.5305​

Sagot :

Answer:

#include <iostream>

using namespace std;

int main()

{

   float speed_in_km_per_hr = 60;

   

   // Output table head

   cout << "km/hr  miles/hr." << endl;

   

   for (int i = 0; i < 10; i++)

   {

     // Convert KM/hr to miles/hr

     float speed_in_miles_per_hr = speed_in_km_per_hr * 0.6241;

     

     // Output speeds

     cout << speed_in_km_per_hr << "     " << speed_in_miles_per_hr << endl;

     

     // Increase by 5

     speed_in_km_per_hr = speed_in_km_per_hr + 5;

   }

     

   return 0;

}

Explanation:

We hope you found what you were looking for. Feel free to revisit us for more answers and updated information. Your visit means a lot to us. Don't hesitate to return for more reliable answers to any questions you may have. We're dedicated to helping you find the answers you need at Westonci.ca. Don't hesitate to return for more.