Originally Posted by
typeqwerty
i need it to look like this. for example when i input 10000 it should say this as output. E
Enter a number of seconds:
There are 166.667 minutes in 10000.000 seconds.
There are 2.778 hours in 10000.000 seconds.
Code:
#include <iostream>
using namespace std;
int main() {
double input,days,hours,minutes,seconds;
cout << "Enter a number of seconds: ";
cin >> input;
seconds = input;
minutes = seconds / 60;
hours = minutes / 60;
days = hours / 24;
cout <<endl << "There are " << minutes << " minutes in " << seconds << " seconds" <<endl;
cout << "There are " << hours << " hours in " << seconds << " seconds" <<endl;
cout << "There are " << days << " days in " << seconds << " seconds" <<endl;
return 0;
}