Advertisement
v4m4v4

Time15Minutes

Sep 25th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1.  
  2.  
  3. #include "stdafx.h"
  4. #include <iostream>
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     int hours, minutes;
  10.     cin >> hours >> minutes;
  11.  
  12.     minutes += 15;
  13.     if (minutes >= 60)
  14.     {
  15.         hours++;
  16.         minutes -= 60;
  17.     }
  18.     if (hours <= 24)
  19.     {
  20.         hours <= 24;
  21.     }
  22.     cout << hours << ":";
  23.     if (minutes < 10)
  24.     {
  25.         cout << "0";
  26.     }
  27.     cout << minutes << endl;
  28.  
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement