cout << "Please enter the starting time in Hour format" << endl;
cin >> hour;
cout << "Please enter the starting time in minute format" << endl;
cin >> minute;
cout << "Please enter the starting time in Hour format" << endl;
cin >> hour;
cout << "Please enter the starting time in minute format" << endl;
cin >> minute;
Let says the user enter 5 for the hour and 2 minute:
I will have other "cout" says: you have talk for 5 hour and 2 minute.
Question is: how do I make 5 hour and 2 minute into one variable?
I think he's putting hours and minutes into decimal hours:
1 2 3 4 5 6
cout << "Please enter the starting time in Hour format" << endl;
cin >> hour;
cout << "Please enter the starting time in minute format" << endl;
cin >> minute;
double hours = hour + (minute / 60.);
Since minutes aren't in base 10, you have to add the minute fraction (minutes/60) to the hour, the same way you would do with like, 1 foot 7 inches. 1'7" == 1+(7/12) feet.
so 1m55s == 1 + (55/60) minutes.