Write a program that input the days and out put the years months and days.

#include<iostream>
using namespace std;
int main()
{
int month,year,days,input;
cout<<“Enter the days : “;
cin>>input;
year=input/365;
days=input%365;
month=days/30;
days=days%30;
cout<<“Years: “<<year<<endl;
cout<<“Months: “<<month<<endl;
cout<<“Days: “<<days;
return 0;
}

//////////////////
///Input sample://
//////////////////
Enter the days: 865
Years: 2
Months: 4
Days: 6
////////////////////////
//Program Explanation//
///////////////////////
In this program simple we are using cout and cin.
cout is used for output and cin used for input.
year=input/365 will divide your input by 365 and save the quotient in year
days=input%365 will save the remainder of input/365
month=days/30 will divide your input by 30 and save the quotient in month
days=days%30 will save the remainder of days/30