Question #48048

Write an algorithm and flow chart that input the distance travel by a vehicle and the speed of the vehicle. It display total time required to reach the destination?

Expert's answer

Answer on Question #48048 – Programming – C++


#include <iostream>
using namespace std;
int main()
{
    double distance;
    double speed;
    cout << "Enter the distance travel: " << endl;
    cin >> distance;
    cout << endl;
    cout << "Enter speed: " << endl;
    cin >> speed;
    cout << endl;
    double TotalTime;
    TotalTime = distance / speed;
    cout << "Total time is: " << TotalTime << endl;
    system("pause");
    return 0;
}


http://www.AssignmentExpert.com/

LATEST TUTORIALS
APPROVED BY CLIENTS