//Downloaded From theonlinetutorials.com
//(C)1999.All rights reserved.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int d,y,w,da;
cout<<"Enter the no of Days"<<endl;
cin>>d;
y=d/365;
w=((y%365)/7);
da=((y%365)%7);
cout<<y<<"Yrs "<<w<<"Weeks"<<da<<"Days";
getch();
}
Not Satisfied ? Just search & get the result
Related posts:
- c program to convert given number of days to a measure of time given in years, weeks and days. For example 375 days is equal to 1 year 1 week and 3 days
- Sample – Program to convert days into years and weeks.
- Sample – Program to find the total days in the year till date.
- C++ program – Implementation of class
- C Program – Implement the midpoint circle drawing algorithm
