-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cc
45 lines (38 loc) · 978 Bytes
/
main.cc
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <iostream>
#include "calendar.h"
using namespace std;
int main()
{
int choice;
do{
cout << "********** Calendar **********" << endl;
cout << "Choose from the Menu" << endl;
cout << "1. Show Calendar" << endl;
cout << "2. Exit" << endl;
int choice;
cin >> choice;
if (choice == 1){
int month, year;
cout << "Enter the month: ";
cin >> month;
cout << "Enter the year: ";
cin >> year;
Calendar cal(month, year);
if (cal.getLeapYear())
{ cout << cal.getYear() <<" was a Leap Year" << endl;}
else
{cout << cal.getYear()<<" was Not Leap Year" << endl;}
cal.printCalendar();
}
else if (choice == 2)
{
cout << "Thank you for using the Calendar" << endl;
}
else
{
cout << "Invalid Choice" << endl;
}
}
while(choice != 2);
return 0;
}