Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can somebody please help me write this program in C++. Thanks! Problem Four trac

ID: 3638232 • Letter: C

Question

Can somebody please help me write this program in C++. Thanks!

Problem
Four track stars entered the mile race at the Penn Relays. Write a program that will read the last name and the race time in minutes and seconds for one runner and compute and print the speed in feet per second and in meters per second after the runner’s name. (Hints: there are 5280 feet in one mile and one kilometer equals 3281 feet; one meter is equal to 3.281 feet.)

Write and call a function that displays instructions to the program user. Write two other functions, one to compute the speed in meters per second and the other to compute the speed in feet per second.

Explanation / Answer

please rate - thanks

#include <iostream>
#include <string>
using namespace std;
void directions();
double fps(int,int);
double mps(int,int);
int main()
{string name;
int min,sec;
directions();
cout<<"Enter runners last name: ";
cin>>name;
cout<<"Enter time in minutes and seconds ";
cout<<"Enter minutes: ";
cin>>min;
cout<<"Enter seconds: ";
cin>>sec;
cout<<name<<"s speed is "<<fps(min,sec)<<" feet per second ";
cout<<"which is "<<mps(min,sec)<<" meters per second ";
system("pause");
return 0;
}
void directions()
{cout<<"Four track stars entered the mile race at the Penn Relays. ";
cout<<"Write a program that will read the last name and the race time ";
cout<<"in minutes and seconds for one runner and compute and print the speed ";
cout<<"in feet per second and in meters per second after the runner's name. ";
}
double fps(int m,int s)
{s=m*60+s;            //change to all seconds
return 5280./s;       //divide feet in a mile by seconds it took
       }
double mps(int m,int s)
{s=m*60+s;      
return (5280./3.281)/s;    //convert feet to meters and divide by seconds
       }