+ 1

How to add time to the minute.

What codes are needed to add 60 minutes after 1 hour

22nd Dec 2017, 5:30 PM
Максим яр
Максим яр - avatar
15 Answers
+ 3
From what I think your code does, here is the edited version: https://code.sololearn.com/c5SZx0S236A8/?ref=app
23rd Dec 2017, 11:22 AM
blackcat1111
blackcat1111 - avatar
+ 5
Ha your question is very undescriptive
22nd Dec 2017, 5:46 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 3
#include <iostream> using namespace std; int main() { int hh,mm; int HH,MM1,MM2; cout <<"Hours "; cin >>hh; cout <<"Minuts "; cin >>mm; MM1=mm+20; HH=hh; cout <<HH<<":"<<MM1<<" 1Poz"<<endl; MM2=MM1+15; cout <<HH<<":"<<MM2<<" 2Poz"<<endl; return 0; }
23rd Dec 2017, 4:59 AM
Максим яр
Максим яр - avatar
+ 3
Welcome! 😀😀
23rd Dec 2017, 11:37 AM
blackcat1111
blackcat1111 - avatar
+ 3
@Максим яр Hmm, I don't really understand what you mean. But I did forget to edit the earlier part, though, so that is fixed now. Why not you look at my code again and see if the problem is fixed? 😉
23rd Dec 2017, 1:02 PM
blackcat1111
blackcat1111 - avatar
+ 3
Alright, I realised I missed out an = sign. I've fixed that problem and added additional time formatting. Why not try the code again? (Sorry for all the mistakes, I'm just really careless sometimes 😉)
23rd Dec 2017, 9:54 PM
blackcat1111
blackcat1111 - avatar
+ 2
int main(){ int minutes, hours; cin >> minutes; cin >> hours; if (minutes > 60){hours++;} cout << minutes; cout << hours; } Something like that? If not, please be more specific on the type of program you want. 😉
22nd Dec 2017, 10:10 PM
blackcat1111
blackcat1111 - avatar
+ 2
Here's what I got. Please tell me how to convert the program that would fully add time. And I add up just ticks.
23rd Dec 2017, 5:03 AM
Максим яр
Максим яр - avatar
+ 2
Тhank you very much
23rd Dec 2017, 11:33 AM
Максим яр
Максим яр - avatar
+ 2
You helped me a lot. I am very grateful to you.
23rd Dec 2017, 11:36 AM
Максим яр
Максим яр - avatar
+ 2
I do not want to seem arrogant.))) You can not answer the last question? How to do what if the value of minutes is 60 then the output was 00.
23rd Dec 2017, 12:00 PM
Максим яр
Максим яр - avatar
+ 2
If you enter a value of 8 40, then the output will be 8 60. Is it possible to do what would be in the bad cases displayed 9:00. And again thanks for the help
23rd Dec 2017, 1:58 PM
Максим яр
Максим яр - avatar
+ 2
I am very grateful to you. Thank you very much for your help. I have no words to express my gratitude. Thank you so much.
24th Dec 2017, 8:11 AM
Максим яр
Максим яр - avatar
+ 1
?
22nd Dec 2017, 5:50 PM
Максим яр
Максим яр - avatar
+ 1
What is the difference between codes for numbers from codes for time, if they differ at all. Can add something you need. I'm new to programming and my questions may seem stupid. Maybe the question is not quite correct.
22nd Dec 2017, 6:00 PM
Максим яр
Максим яр - avatar