Answer to Question #263004 in C++ for Rille

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

1
Expert's answer
2021-11-12T17:37:39-0500

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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS