9. Write a C program to convert days into years, weeks and days.
Solution :-
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int day,year,week,days;
printf("Enter the number of days :- ");
scanf("%d",&days);
year = days/365;
week = (days % 365)/7;
day = days-((year * 365)+(week * 7));
printf("\nThe No. of Year :- %d",year);
printf("\nThe No. of Week:- %d ",week);
printf("\nThe No. of Day :- %d",day);
getch();
}
Output :-