Convert hours into minutes and seconds program in C++ (C Plus Plus).

Convert hours into minutes and seconds program in C++ (C Plus Plus).

  1. Convert hours into minutes and seconds program in C++ (C Plus Plus)
// 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:

Convert hours into minutes into second program in C++(C Plus Plus)
Figure:Convert hours into minutes into second program in C++ (C Plus Plus)
Prof. Fazal Rehman Shamil
Researcher, Publisher of International Journal Of Software Technology & Science ISSN: 2616-5325
Instructor, SEO Expert, Web Programmer and poet.
Feel free to contact.