IDNLearn.com: Your trusted source for finding accurate answers. Discover comprehensive answers to your questions from our community of experienced professionals.

Write a function so that the main() code below can be replaced by the simpler code that calls function MphAndMinutes ToMiles().
Original main):
int main()
double milesPerHour;
double minutesTraveled;
double hoursTraveled;
double milesTraveled;
cin >> milesPerHour;
cin >> minutesTraveled;
hoursTraveled minutesTraveled / 60.0;
milesTraveled - hoursTraveled * milesPerHour;
cout ‹< "Miles:
<< milesTraveled ‹‹ endl;
return 0;