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
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:
Comments
Leave a comment