- 2

Help to write a program!!! Preferably in C++ or Python

Tanya decided to call her friend, but remembered that she lives very far away, so in the time zone girlfriend may be too late or too early. Tanya's watch shows exactly H hours, Tanya lives in the UTC+A time zone, and her friend lives in the UTC+b time zone. Help Tanya determine the time in her friend's time zone at this moment. The program receives three integers H, A and B, 0 ≤ H ≤ 23, -11 ≤ A ≤ 12, -11 ≤ B ≤ 12. In the UTC+A time zone, the local time is greater than the time in the UTC+0 time zone by A hours (if A < 0, then less by |A / hours). For example, if the UTC+0 time zone is 12 o'clock, the UTC+1 time zone is 13 o'clock, and the UTC−1 time zone is 11 o'clock. The program should display one number-the time (number of hours) in the time zone of the girlfriend. The time in this task is the number of hours, which can take values from 0 to 23

22nd Oct 2019, 8:12 PM
lolkeker1337
1 Odpowiedź
+ 5
Please show your attempts, an example code or pseudo code. If you don't people might think you want them to do your homework. Asking particular questions about what you are struggling with also maximizes your chances to receive useful answers.
24th Oct 2019, 7:12 PM
Tashi N
Tashi N - avatar