#include <iostream>
int calculateEaster(int year) {
    int a = year % 19;
    int b = year / 100;
    int c = year % 100;
    int d = b / 4;
    int e = b % 4;
    int f = (b + 8) / 25;
    int g = (b - f + 1) / 3;
    int h = (19 * a + b - d - g + 15) % 30;
    int i = c / 4;
    int k = c % 4;
    int l = (32 + 2 * e + 2 * i - h - k) % 7;
    int m = (a + 11 * h + 22 * l) / 451;
    int month = (h + l - 7 * m + 114) / 31;
    int day = ((h + l - 7 * m + 114) % 31) + 1;
    return month * 100 + day;
}
int main() {
    int year;
    std::cout << "What year: ";
    std::cin >> year;
    int easterDate = calculateEaster(year);
    int month = easterDate / 100;
    int day = easterDate % 100;
    std::cout << "Easter falls on day: " << month << "/" << day << "/" << year << "\n";
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: