+ 4
How to write a program on how many seconds in a day?please help?
4 Answers
+ 6
cout << 24 * 60 * 60;
+ 5
There are 60 seconds in a minute and 60 minutes in an hour and 24 hours in a day. So:
int secondsInDay = 60 * 60 * 24;
+ 1
For the current second count:
#include <ctime>
#include <iostream>
int main()
{
std::cout << std::time(0) % (24 * 60 *60);
}
0
iOStream ??