He was traveling from India to various countries around the world.
#include <stdio.h>
int main()
{int ndays,y,m,d;
scanf("%d",&ndays);
y=ndays/365;
ndays=ndays-(y*365);
m=ndays/30;
d=ndays-(m*30);
printf("%d Y(s) %d M(s) %d D(s)",y,m,d);
return 0;
}
He was traveling from India to various countries around the world.
#include <stdio.h>
int main()
{int ndays,y,m,d;
scanf("%d",&ndays);
y=ndays/365;
ndays=ndays-(y*365);
m=ndays/30;
d=ndays-(m*30);
printf("%d Y(s) %d M(s) %d D(s)",y,m,d);
return 0;
}
0 Comments
if you have any doubt, plz let me know