fork download
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int hours, hour, minutes, minute ;
  9. cout << "Input the time as hours and minutes:" << endl;
  10. cin >> hours >> minutes ;
  11. cout << "Your time was " << hours << ":" << minutes << endl;
  12. minutes = ++minutes;
  13. hour = minutes/60;
  14. hours = hours + hour;
  15. minute = minutes%60;
  16. minutes = minute;
  17. hour = hours/13;
  18. hours = hours + hour;
  19. hours = hours%13;
  20. cout << "In one minute it will be " << hours << ":" << setfill('0') << setw(2) << minutes << endl;
  21. return 0 ;
  22. }
  23.  
Success #stdin #stdout 0s 3344KB
stdin
10 57
stdout
Input the time as hours and minutes:
Your time was 10:57
In one minute it will be 10:58