Guest User

Untitled

a guest
Nov 18th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. const int SECONDSPERMINUTE = 60;
  5. const int MINTUTESPERHOUR = 60;
  6. const int SECONDSPERHOUR = SECONDSPERMINUTE*MINTUTESPERHOUR;
  7. const int HOURSPERDAY = 24;
  8.  
  9. void main()
  10. {
  11. int Count = 0;
  12.  
  13. for (int i = 0;i < HOURSPERDAY;i++)
  14. {
  15. if ((i % 10) == 3) Count += SECONDSPERHOUR;
  16. else
  17. {
  18. for (int j = 0;j < MINTUTESPERHOUR;j++)
  19. {
  20. if ((j / 10) == 3) Count += SECONDSPERMINUTE;
  21. else
  22. {
  23. if ((j % 10) == 3) Count += SECONDSPERMINUTE;
  24. }
  25. }
  26. }
  27. }
  28.  
  29. cout << Count;
  30. }
Add Comment
Please, Sign In to add comment