Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main(){
- int days, weeks, years;
- printf("Enter the days: ");
- scanf("%d", &days);
- years = days/365;
- weeks = (days%365)/7;
- days = days - ((years * 365) + (weeks * 7));
- printf("Years: %d, Weeks: %d, Days: %d", years, weeks, days);
- return 0;
- }
Add Comment
Please, Sign In to add comment