Examples of C part 9 convert year,days

                 CONVERT DAY INTO YEAR
PROGRAM :
#include<stdio.h>
main()
{
 int nodays,years,weeks,days;
 printf("Enter the total days\n");
 scanf("%d",&nodays);
 years=nodays/365;
 weeks=(nodays%365)/7;
 days=(nodays%365)%7;
 printf("%d = %d years,%d weeks,%d
        days\n",nodays,years,weeks,days);
}
Output:
Enter the total days
500
500 = 1 years,19 weeks,2 days