Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- const int SECONDSPERMINUTE = 60;
- const int MINTUTESPERHOUR = 60;
- const int SECONDSPERHOUR = SECONDSPERMINUTE*MINTUTESPERHOUR;
- const int HOURSPERDAY = 24;
- void main()
- {
- int Count = 0;
- for (int i = 0;i < HOURSPERDAY;i++)
- {
- if ((i % 10) == 3) Count += SECONDSPERHOUR;
- else
- {
- for (int j = 0;j < MINTUTESPERHOUR;j++)
- {
- if ((j / 10) == 3) Count += SECONDSPERMINUTE;
- else
- {
- if ((j % 10) == 3) Count += SECONDSPERMINUTE;
- }
- }
- }
- }
- cout << Count;
- }
Add Comment
Please, Sign In to add comment