Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "date.h"
- using namespace std;
- int main() {
- date d1(1, 7, 2016), d2(1, 1, 1991);
- d1 += 5;
- d2 -= 4;
- cout << d1 << " " << d2 << endl;
- int diff = d1 -d2;
- cout << diff << endl;
- cout << (d2 - 100) << " " << d1 + 100 << endl;
- int diff2 = ++d1 - d2++;
- cout << diff2 << endl;
- cout << d1 << " " << d2 << endl;
- if( d1>d2 )
- cout << "d1>d2" << endl;
- cout << d1 << " " << d2 << endl;
- if( d2.isBissextile() && d2!=d1 )
- d2.PrintDate();
- d2.PrintDate();
- return 0;
- }
Add Comment
Please, Sign In to add comment