Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

help. need in visual studios, c++ programming, also can screenshot of results be

ID: 3727806 • Letter: H

Question

help. need in visual studios, c++ programming, also can screenshot of results be provided to make sure it looks like poctures provided.




The Western Church calculates the month and day on which Easter occurs for a given year (between 1583 and 4099 inclusive) thusly: Easter occurs on the first Sunday after the first full moon after the Vernal Equinox. Luckily for you, there is an algorithm available for this calculation; thus, you need not worry about the astronomical calculations or which calendar was/is in use (l.e. Gregorian or Julian). Remember that this algorithm only works for years after 1582 and before 4100! In order to complete this project, you will use the algorithm (integer math only) derived by refining the "Butcher's Ecclesiastical Calendar" rule as indicated below Accurate for method 3 (Western Easters only) from 1583 to 4099 in the Gregorian calendar Function Eastertodges(dy, mth, ByVal y, ByVal method) As Boolean by David Hodges, derived by refining the "Jutoher"s Eoclesiastical Calendar" rule Vaiidate argunents If nethod 3 Or y 4099 Then Msg ox "Hodge method only applie to the revised 1ca1ation 2n the Gregorian caiend.r from 1583 to99 AD" Exit Punetson End it EasterHodges True y 200 by Nod 10 15b) Nod 29 hf +11319 30S d) +b) P-h m +11) Nod 31 dy “ p + 1 'Easter Sunday 1.3 g -h + m d ys after Harch 22nd End Panction

Explanation / Answer

#include <iostream>
using namespace std;

//Converted function into C++ code
bool EasterHodgens(int dy, int mth, ByVal y, ByVal method)
{
int a,b,c,d,e,f,g,h,j,k,m,n,p;
bool EasterHodgen;
if(y<1583 || y>4099)
{
EasterHodgen = false;
d=0;
m=0;
printf("Hodges method only applies to the revised calculations in the Gregorian calender from 1583 to 4099. ");
}
else
{
EasterHodgen = true;
a=y/100;
b=y%100;
c = (3 * (a+25))/4;
d = (3 * (a+25))%4;
e = (6 * (a+11))/25;
f = (5 * a + b)%19;
g = 19 * f +c -e)%30;
h = (f + 11 * g)/319;
j = (60 * (5-d) + b)/4;
k = (60 * (5-d) + b)%4;
m = (2*j - k -g + h)%7;
n = (g - h + m + 114)/31;
p = (g - h + m + 114)%31;
dy = p + 1;
mth = n;
}
return EasterHodgen;
}
int main()
{
//write your function calling here
return 0;
}