Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ahmed Sami:
- #include <iostream>
- using namespace std;
- struct time{
- int year[2],month[2],day[2];
- int mins[2];
- int clk[2];
- };
- void dt(){
- struct time t;
- for(int i=0;i<2;i++){
- cout<<"Entre date year/month/day : ";
- cin>>t.year[i]>>t.month[i]>>t.day[i];
- cout<<"\n Entre time o'clock : minutes ";
- cin>>t.clk[i];
- cout<<" : ";
- cin>>t.mins[i];
- }
- int dif;
- dif = t.mins[0] - t.mins[1];
- cout<<"\n the diffrence between these two times : "<<dif<<" minuites"<<endl;
- }
- int main()
- {
- dt();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement