#include #include void main() { int year, a, b, c, d, e, f, x, y, z, type; clrscr(); do{ gotoxy(10, 5); printf("Press 1 for Orthodox Easter and 2 for Western Easter: "); scanf("%d", &type); }while( type != 1 && type != 2 ); if( type == 1 ) { gotoxy(10, 8); printf("Enter the year: "); scanf("%d", &year); a = year % 19; x = a * 11; y = x % 30; z = y - 40; if( z > 30 ) z -= 30; gotoxy( 15, 10); switch( z ) { case 1: printf("Easter is on Baramuda %d, which is April 9.", z); break; case 2: printf("Easter is on Baramuda %d, which is April 10.", z); break; case 3: printf("Easter is on Baramuda %d, which is April 11.", z); break; case 4: printf("Easter is on Baramuda %d, which is April 12.", z); break; case 5: printf("Easter is on Baramuda %d, which is April 13.", z); break; case 6: printf("Easter is on Baramuda %d, which is April 14.", z); break; case 7: printf("Easter is on Baramuda %d, which is April 15.", z); break; case 8: printf("Easter is on Baramuda %d, which is April 16.", z); break; case 9: printf("Easter is on Baramuda %d, which is April 17.", z); break; case 10: printf("Easter is on Baramuda %d, which is April 18.", z); break; case 11: printf("Easter is on Baramuda %d, which is April 19.", z); break; case 12: printf("Easter is on Baramuda %d, which is April 20.", z); break; case 13: printf("Easter is on Baramuda %d, which is April 21.", z); break; case 14: printf("Easter is on Baramuda %d, which is April 22.", z); break; case 15: printf("Easter is on Baramuda %d, which is April 23.", z); break; case 16: printf("Easter is on Baramuda %d, which is April 24.", z); break; case 17: printf("Easter is on Baramuda %d, which is April 25.", z); break; case 18: printf("Easter is on Baramuda %d, which is April 26.", z); break; case 19: printf("Easter is on Baramuda %d, which is April 27.", z); break; case 20: printf("Easter is on Baramuda %d, which is April 28.", z); break; case 21: printf("Easter is on Baramuda %d, which is April 29.", z); break; case 22: printf("Easter is on Baramuda %d, which is April 30.", z); break; case 23: printf("Easter is on Baramuda %d, which is May 1.", z); break; case 24: printf("Easter is on Baramuda %d, which is May 2.", z); break; case 25: printf("Easter is on Baramhat %d, which is April 3.", z); break; case 26: printf("Easter is on Baramhat %d, which is April 4.", z); break; case 27: printf("Easter is on Baramhat %d, which is April 5.", z); break; case 28: printf("Easter is on Baramhat %d, which is April 6.", z); break; case 29: printf("Easter is on Baramhat %d, which is April 7.", z); break; case 30: printf("Easter is on Baramhat %d, which is April 8.", z); break; } } else { a = year % 19; b = year % 4; c = year % 7; y = 19 * a + 24; d = y % 30; z = 2*b + 4*c + 6*d + 5; e = z % 7; f = d + e; if( f < 34 ) { x = f + 22; } else if( f == 34 ) { if( d != 28 ) x = f + 22; else x = f + 15; } else { x = f + 15; } gotoxy( 15, 10); if( x > 31 ) { printf("Easter is on April %d.", x-31); } else { printf("Easter is on March %d.", x); } } }