c++ program that calculates the distance covered by a vehicle given the speed and time. code example

Example: c++ program that calculates the distance covered by a vehicle given the speed and time.

#include <iostream>
using namespace std;
int main()
{
  int speed;
  int km;
  cout << "Please enter the speed:";
  cin >>[40]; 
  cout << "please enter the total km traveled:";
  cin >> [100];
  cout << endl << endl << "it will take a cyclist" << distance / speed << "hours for the cyclist to get its" << endl;
  cout << "destination.";
  return 0;
}

Tags:

Misc Example