Answer:
#include<iostream>
using namespace std;
void OutputMinutesAsHours(double origMinutes) { //Same as question
double hours=origMinutes/60; //solution is here
cout<<hours;
}
//Below is same as mentioned in question
int main() {
OutputMinutesAsHours(210.0);
cout << endl;
return 0;
}
OUTPUT :
3.5
Explanation:
In the above code, only two lines are added. To convert minutes into hours we have to divide them 60, so we take minutes as input and define a new variable of double type which stores minutes converted to hours and then that variable is printed to console. For 210, it gives 3.5, similarly for 3600 it gives 60 and so on.