rendered paste body#include <iostream>
using namespace std;
int main ()
{
int mph, hours, distance;
cout <<"What is the speed of the vehicle in mph? ";
cin >> mph;
while ( mph <= 0 )
{
cout <<"How many hours has it travelled? ";
cin >> hours;
while ( hours <= 1)
{
cout << "Hour Distance" << endl;
cout <<"---------------------------------------------" <<endl;
for ( int counter = 1; counter <= hours; counter++ )
{
distance = mph * counter;
cout << counter <<" " << distance <<endl;
}
cout << "Hour Distance" << endl;
cout <<"---------------------------------------------" <<endl;
}
}
return 0;
}