1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
#include <iostream>
using namespace std;
float input ();
float process (float,float,float);
void display (float);
int main(){
float result,myinput,steps,minutes,seconds;
//*Function Call*//
myinput = input(steps,minutes,seconds);
result = process(steps,minutes,seconds);
display(result);
return 0;
}
float input (){
float steps,minutes,seconds;
cout << "Enter the steps , minutes, seconds = " << endl;
cin >> steps >> minutes >> seconds ;
return steps,minutes,steps;
}
float process (float steps, float minutes, float seconds){
float result;
result = (minutes+seconds) / 60 ;
result = result * 2.5 ;
result = result / 5280 ;
result = result * steps;
return result;
}
void display (float result){
cout << "The total distance is " << result << " miles" << endl;
return ;
}
|