+ 1
How to add time to the minute.
What codes are needed to add 60 minutes after 1 hour
15 Answers
+ 3
From what I think your code does, here is the edited version:
https://code.sololearn.com/c5SZx0S236A8/?ref=app
+ 5
Ha your question is very undescriptive
+ 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;
}
+ 3
Welcome! 😀😀
+ 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? 😉
+ 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 😉)
+ 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. 😉
+ 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.
+ 2
Тhank you very much
+ 2
You helped me a lot. I am very grateful to you.
+ 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.
+ 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
+ 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.
+ 1
?
+ 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.