Program to calculate Number of Years and Days according to given minutes.
There is total 525600 Minutes in one year and 1440 Minutes in a day.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#include<iostream> using namespace std; int main() { double long mins, years, days; cout<<"Please Enter Total Minutes : "; cin>>mins; years=mins/525600; days=mins/1440; cout<<mins<<" Minutes = "<<years<<" Year\n"; cout<<mins<<" Minutes = "<<days<<" Days\n"; return 0; } |
Output:

C++ Program to Convert Minutes into a number of Years and Days

C++ Program to Convert Minutes into a number of Years and Days Code