Advertisement
Guest User

Untitled

a guest
Jan 27th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. <?php
  2.  
  3. $hh = readline();
  4. $mm = readline();
  5.  
  6. $sum = (($hh*60) + $mm + 15);
  7. $resulthour = floor($sum / 60);
  8. $resultmin = $sum % 60;
  9. if ($resulthour > 23) {
  10.     echo "0".":";
  11. } else {
  12.     echo $resulthour . ":";
  13. }
  14.  
  15. if ($resultmin < 10) {
  16.     echo "0";
  17. }
  18. echo $resultmin;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement