Advertisement
Josif_tepe

Untitled

Jan 28th, 2022
903
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int casovi, minuti;
  8.     cin >> casovi >> minuti;
  9.     int promeni = 0 ;
  10.     for (int i = 0; i < 10; i ++)
  11.     {
  12.         if (minuti % 10 == 9)
  13.         {
  14.             promeni += 2;
  15.         }
  16.         else {promeni += 1;}
  17.         minuti++;
  18.         if (minuti == 60)
  19.         {
  20.             minuti = 0;
  21.             if (casovi == 9 or casovi == 19 or casovi == 23)
  22.             {
  23.                 promeni += 2;
  24.             }
  25.             else {promeni += 1;}
  26.             casovi++;
  27.         }
  28.     }
  29.     cout << promeni << endl;
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement