credibility so he can trust the source , revelance so it even relates to his study. and popularity to see if others have trusted this source as well but popularity part isnt as important as the other two
Answer:
// here is code in c++.
// include headers
#include <bits/stdc++.h>
using namespace std;
// function that calculate days, hours, minutes and seconds
void howLong(int sec)
{
// find days
int days=sec/86400;
// update the seconds
sec=sec%86400;
// find hours
int h=sec/3600;
// update the seconds
sec=sec%3600;
// find minutes
int min=sec/60;
// update the seconds
sec=sec%60;
// output
cout<<sec<<"seconds is "<<days<<" days,"<<h<<" hours,"<<min<<" minutes,and "<<sec<<"seconds."<<endl;
}
// driver function
int main()
{ // variable
int sec;
cout<<"Enter seconds:";
// read the seconds
cin>>sec;
// call the function
howLong(sec);
return 0;
}
Explanation:
Read the seconds from user.Then call the function howLong() with parameter seconds. In the function, it will first find the number of days by dividing the seconds with 86400 then update the remaining seconds.Next it will find the hours by dividing the remaining seconds with 3600 and update the remaining seconds.After that it will find the minutes by dividing the remaining seconds with 60 and update the remaining second.Then it will print the days, hours, minutes and seconds.
Output:
Enter seconds:70000
40seconds is 0 days,19 hours,26 minutes,and 40seconds.
Because of the reflection on the window or mirror.