Advertisement
v4m4v4

Time 15Minutes

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