/*Before seeing the code solution make sure that you have tried enough. Don’t copy- paste the whole code. Find out the logic. If you face any trouble, just inform me in comment.*/
#include<stdio.h>
main()
{
int n,y,m,d,n1,n2;
scanf("%d",&n);
y=n/365;
n1=n%365;
m=n1/30;
n2=n1%30;
d=n2;
printf("%d ano(s)\n%d mes(es)\n%d dia(s)\n",y,m,d);
return 0;
}
//Happy_Coding
#include<stdio.h>
main()
{
int n,y,m,d,n1,n2;
scanf("%d",&n);
y=n/365;
n1=n%365;
m=n1/30;
n2=n1%30;
d=n2;
printf("%d ano(s)\n%d mes(es)\n%d dia(s)\n",y,m,d);
return 0;
}
No comments:
Post a Comment