Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int A, B, H, Buff;
- int main()
- {
- cin >> H;
- cin >> A;
- cin >> B;
- Buff = H - A;
- Buff = Buff + B;
- while(Buff < 0)
- {
- Buff+=24;
- }
- while(Buff > 23)
- {
- Buff-=24;
- }
- cout << Buff;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement