Question: Write a C Program that converts a given number of Days in terms of years, weeks & days. Given the number of days, then it
Write a C Program that converts a given number of Days in terms of years, weeks & days.
Given the number of days, then it calculates the years, weeks & days for this number.
For example 375 days is equal to 1 year, 1 week and 3 days.
Ignore leap year.
We assume there is only 365 days only. It is not 365 and quarter of a day.
$ a.out
Enter the number of days: 29
29 is equivalent to 0 years, 4 weeks and 1 days
$ a.out
Enter the number of days: 1000
1000 is equivalent to 2 years, 38 weeks and 4 days
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
