// Leap year tester
// By Ben
// 23:55 28/09/2016

#include <iostream>
using namespace std;
using std::cout;
using std::endl;
using std::cin;

bool IsLeapYear(int year){
	//Test if year is a leap year or not.
	if(((year % 4 == 0) && 
		(year % 100 !=0) || 
		(year % 400 == 0))) {
		return true;
	}
	return false;
}

void main(){
	int dStart = 0;
	int dEnd = 0;
	system("title Leap Year Test");
	cout << "ͻ" << endl;
	cout << " Leap Year Lister" << endl;
	cout << "ͼ" << endl;
	cout << "Enter starting date and end date" << endl;
	cout << "Start: ";
	cin >> dStart;
	cout << "End: ";
	cin >> dEnd;
	//Print out leap years
	for(int i = dStart;i<=dEnd;i++){
		//Test for leap year
		if(IsLeapYear(i)){
			cout << "Leap Year : " << i << endl;
		}
	}
	system("pause");