daily pastebin goal
70%
SHARE
TWEET

Untitled

a guest Jan 24th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $hours = readline();
  4. $minutes = readline();
  5.  
  6. $minutes += 15;
  7.  
  8. if ($minutes > 59) {
  9.     $hours += 1;
  10.     $minutes -= 60;
  11.     if ($hours > 23) {
  12.         $hours = 0;
  13.     }
  14. }
  15.  
  16. if ($minutes < 10) {
  17.     echo "$hours:0$minutes";
  18. } else {
  19.     echo "$hours:$minutes";
  20. }
RAW Paste Data
Top