Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int h1, h2, ht, m1, m2, mt, s1, s2, st;
- cout<<"Inttrroduceti primul interval de timp(ora, minut, secunda)"<<endl;
- cin>>h1>>m1>>s1;
- cout<<"Inttrroduceti al doila interval de timp(ora, minut, secunda)";
- cin>>h2>>m2>>s2;
- st=s1+s2;
- mt=m1+m2+st/60;
- st=st%60;
- ht=h1+h2+mt/60;
- mt=mt%60;
- cout<<"Intervalul de timp este:"<<ht<<"ore, "<<mt<<"minute, "<<st<<"secunde";
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement