The trouble is you think you have time. Your success depends on how you utilize your time.

C++ Program to convert hours into seconds and into minutes by taking Hours as input and print them.


Write a C++ program to convert Hours into seconds and into Minutes by taking Hours as input and print them.



#include<iostream>
using namespace std;
int main()
{ cout<<"www.moznum.blogspot.com"<<endl<<endl;


int hours,minutes,seconds;
cout << "Enter the no. of hours: ";
cin >> hours;

minutes = hours*60;
seconds = hours*3600;
cout << "No. of minutes are: " << minutes <<endl;
cout << "No. of seconds are: " << seconds <<endl;
return 0;
}

You can also find this program by this:

2 comments: