Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int t,y,a,M,b,c,d,e,h,m,s;
- printf("Enter seconds : ");
- scanf("%d",&t);
- y=t/31536000;
- a=t%31536000;
- M=a/2592000;
- b=a%2592000;
- d=b/86400;
- c=b%86400;
- h=c/3600;
- e=c%3600;
- m=e/60;
- s=e%60;
- printf("%d years %d months %d days %d hours %d minutes %d seconds\n",y,M,d,h,m,s);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement