Post Increment and Decrement


Overload the post increment and decrement operator.Check to see the limit of the hours lies between 0-23, the minutes lies between 0-59. Test Case 1 Input (stdin) 3 20 Expected Output H:3 M:21 H:3 M:22 Test Case 2 Input (stdin) 5 26 Expected Output H:5 M:27 H:5 M:28

Program :

#include <iostream>

using namespace std;

int main()


int a,b;


  cout<<"H:"<<a<<" M:"<<b+1<<endl;

  cout<<"H:"<<a<<" M:"<<b+2;

return 0;