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

9th Oct 2021, 7:46 AM
사자 왕
사자 왕 - avatar
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; }
9th Oct 2021, 8:02 AM
Myo Thuzar
Myo Thuzar - avatar
+ 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
9th Oct 2021, 7:48 AM
사자 왕
사자 왕 - avatar
- 1
You already solved this.
9th Oct 2021, 7:52 AM
Kashyap Kumar
Kashyap Kumar - avatar