Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- struct clipa
- {
- int sec,mi,ora;
- };
- void timp(clipa c)
- {
- if(c.ora<10)
- cout<<0<<c.ora<<":";
- else cout<<c.ora<<":";
- if(c.mi<10)
- cout<<0<<c.mi<<":";
- else cout<<c.mi<<":";
- if(c.sec<10)
- cout<<0<<c.sec<<":";
- else cout<<c.sec<<":";
- }
- ifstream f("clipa.in");
- int main()
- {int n,minut,secunda,ora;
- clipa x,tp;
- tp.ora=tp.mi=tp.sec=0;
- f>>n;
- while(n)
- {
- f>>x.sec>>x.mi>>x.ora;
- timp(x);
- cout<<endl;
- n--;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement