0
How to slove this
You are building an Hours to Minutes converter. Complete the given function so that it will take from user the count of hours as an argument, convert them into minutes, and output. Sample Input 5 Sample Output 300
3 Réponses
+ 2
Void function performs the desired operation without returning any value.
So do this...
#include <iostream>
using namespace std;
//your function
void toMinutes(int hours) {
//complete the function
cout<< hours *60;
}
int main() {
int hours;
cin>> hours;
//call the function
toMinutes( hours);
return 0;
}
+ 1
#include <iostream>
using namespace std;
//your function
void toMinutes(int hours) {
//complete the function
return hours *60;
}
int main() {
//call the function
int hours;
cin>> hours;
cout<< toMinutes (hours);
return 0;
}
// my code
- 1
You already solved this.