Convert hours into minutes and seconds program in C++ (C Plus Plus).
Convert seconds into minutes and Hours program in C++ (C Plus Plus).
Convert hours into minutes and seconds program in C++ (C Plus Plus)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
// Convert hours into minutes into second #include <iostream> using namespace std; int main() { int h,m,s,sec; cout<<"Enter Second "; cin>>sec; h=sec/3600; sec=sec%3600; m=sec
/60; sec=sec%60; s=sec%60; cout<<"Hours ="<<h<<endl; cout<<"Mintes ="<<m<<endl; cout<<"Second ="<<s<<endl; } |
Output:
Figure:Convert hours into minutes into second program in C++ (C Plus Plus)