Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- typedef struct { int a;}date;
- int main()
- { date x,y;
- float d;
- cout<<"Introduceti prima data:";cin>>x.a;
- cout<<"Introduceti a doua data:";cin>>y.a;
- if(x.a>y.a)
- cout<<y.a<<endl;
- else
- cout<<x.a<<endl;
- cout<<"diferenta dintre cele doua date este: ";
- if(x.a>y.a)
- d=x.a-y.a;
- else
- d=y.a-x.a;
- cout<<d;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement