Answer:
// here is code in c.
#include <stdio.h>
// main function
int main()
{
// variable to store seconds
long long int second;
printf("enter seconds:");
// read the seconds
scanf("%lld",&second);
// if seconds is in between 60 and 3600
if(second>=60&& second<3600)
{
// find the minutes
int min=second/60;
printf("there are %d minutes in %lld seconds.",min,second);
}
// if seconds is in between 3600 and 86400
else if(second>=3600&&second<86400)
{
// find the hours
int hours=second/3600;
printf("there are %d minutes in %lld seconds.",hours,second);
}
// if seconds is greater than 86400
else if(second>86400)
{
// find the days
int days=second/86400;
printf("there are %d minutes in %lld seconds.",days,second);
}
return 0;
}
Explanation:
Read the seconds from user.If the seconds is in between 60 and 3600 then find the minutes by dividing seconds with 60 and print it.If seconds if in between 3600 and 86400 then find the hours by dividing second with 3600 and print it. If the seconds is greater than 86400 then find the days by dividing it with 86400 and print it.
Output:
enter seconds:89
there are 1 minutes in 89 seconds.
enter seconds:890000
there are 10 days in 890000 seconds.