Advertisement
terlichki

Untitled

Feb 16th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. <?php
  2.  
  3. $hour = intval(readline());
  4. $minetsincome = intval(readline());
  5. $timeTravelining = intval(readline());
  6. $sumary = $minetsincome + $timeTravelining;
  7. for ($i = 59; $i <= $sumary; $i++) {
  8. if ($sumary >= 60) {
  9. $sumary = $sumary - 60;
  10. $hour+=1;
  11. }
  12. }
  13. if ($hour>=24){
  14. $hour = $hour - 24;
  15. }
  16. echo $hour . "h " . $sumary . "m";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement