-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
28 lines (21 loc) · 750 Bytes
/
main.cpp
File metadata and controls
28 lines (21 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
#include <iomanip>
#include "dateType.h"
int main() {
dateType myDate(11, 8, 2023);
std::cout << "Original Date: " << myDate << std::endl;
++myDate;
std::cout << "Date after increment: " << myDate << std::endl;
--myDate;
std::cout << "Date after decrement: " << myDate << std::endl;
dateType anotherDate;
std::cout << "Enter a date (MM-DD-YYYY): ";
std::cin >> anotherDate;
if (myDate.operator==(anotherDate))
std::cout << "The two dates are equal." << std::endl;
else if (myDate.operator<(anotherDate))
std::cout << "The entered date is in the future." << std::endl;
else
std::cout << "The entered date is in the past." << std::endl;
return 0;
}