⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eastersunday.java

📁 A specific version of a quicksorter which can be used to test for efficiveness of different sorts
💻 JAVA
字号:

//
// This is the EasterSunday class that will
// calculate the date on which Easter occurs in the given year.

public class EasterSunday
{
	private int year, month, day;

	public EasterSunday(int y)
	{
		year = y;
		int a, b, c, d, e, g, h, j, k, m, r, n, p;
		a = year % 19;
		b = year / 100;
		c = year % 100;
		d = b / 4;
		e = b % 4;
		g = (8 * b +13) / 25;
		h = (19 * a + b - d - g + 15) % 30;
		j = c / 4;
		k = c % 4;
		m = (a +11 *h) / 319;
		r = (2 * e + 2 * j - k - h + m + 32) % 7;
		n = (h - m + r + 90) / 25;
		p = (h - m + r + n + 19) % 32;
		month = n;
		day = p;
	}

	public int getMonth()
	{
		return month;
	}

	public int getDay()
	{
		return day;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -