SHARE
TWEET

olimpapa

a guest Oct 23rd, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int A, B, H, Buff;
  6.  
  7. int main()
  8. {
  9.     cin >> H;
  10.     cin >> A;
  11.     cin >> B;
  12.     Buff = H - A;
  13.     Buff = Buff + B;
  14.     while(Buff < 0)
  15.     {
  16.       Buff+=24;
  17.     }
  18.     while(Buff > 23)
  19.     {
  20.       Buff-=24;
  21.     }
  22.     cout << Buff;
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top