Question #263004

Make a program that will input minutes, convert it into hour. Display the equivalent hour/s .


Your program will be terminated if you input zero in the hour.


Ex. Minutes = 120


Equivalent Hour is = 2

Expert's answer

Source code:

#include <iostream>


using namespace std;


int main()
{
    while(true){
        int minutes;
        cout<<"\nEnter minutes: ";
        cin>>minutes;
        double hours=minutes/60.0;
        if (hours==0){
            break;
        }
        cout<<"\nEquivalent Hour is = "<<hours;
    }


    return 0;
}

Output:

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS