using namespace std; #include main () { int year; bool leap; // Get year from user and determine whether it is a leap year cout << "What year are you interested in? "; cin >> year; leap = false; if (year % 4 == 0) if ((year % 100 != 0) || (year % 400 == 0)) leap = true; cout << "The year " << year; if (leap) cout << " is a leap year.\n"; else cout << " is not a leap year.\n"; }