P015.c (536B)
1 /* 2 * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025 3 * Repo: https://github.com/notamitgamer/bsc 4 * License: MIT 5 */ 6 7 /*WAP to accept number of days and 8 display it after converting into 9 number of years, months and days */ 10 11 #include<stdio.h> 12 int main() { 13 int day, month, year, temp; 14 printf("Enter the number of days : "); 15 scanf("%d", &day); 16 temp = day; 17 year = day / 365; 18 day = day % 365; 19 month = day / 30; 20 day = day % 30; 21 printf("\n%d Days = %d Years %d Months %d Days", temp, year, month, day); 22 return 0; 23 }