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

error C2447: \'{\' : missing function header (old-style formal list?) //Header F

ID: 3656821 • Letter: E

Question

error C2447: '{' : missing function header (old-style formal list?) //Header Files #include #include #include #include using namespace std; //Function Headings int DayofWeek(int DayofWeek, int intRes1 = 0, int intRes2 = 0, int intRes3 = 0, int JDN = 0, bool dataOK = false); void DetermineWeekDay(float day,float month,float year,int JDN,int intRes1,int intRes2,int intRes3,int& DayofWeek); //Main Function int main() { //Declaring Variables float day; float month; float year; int DayofWeek; int intRes1 = 0; int intRes2 = 0; int intRes3 = 0; int JDN = 0; bool dataOK = false; do { //Ask User To Enter Month cout<< "Please enter the month:" ; cin>> month; //Ask User To Enter Day Of The Week cout<< "Please enter the week day:" ; cin>> day; //Ask User To Enter The Year cout<< "Please enter the year:" ; cin>> year; // if (month<13) dataOK = true; else cout<< "Please enter a number less than 13 for the month:" << endl; if (day<32); else cout<< "Please enter a number less than 32 for the day:" << endl; if((year>1582),//Picks any years from Gregorian Calendar greater than 1582 (month>10)&&(year==1582),//Picks months greater than 10 in 1582 from Gregorian Calendar (month==10)&&(day>15)&&(year==1582));//Picks only month 10 and any days over 15 in year 1582 from Gregorian Calendar } while (dataOK==false); DetermineWeekDay (day,month,JDN,year,intRes1,intRes2,intRes3,DayofWeek); cin.get(); cin.get(); return 0; } void DetermineWeekDay (float day,float month,float year, int JDN, int intRes1,int intRes2,int intRes3,int&DayofWeek); { //Precondition: The day of the week must be entered //Postcondition: The user must enter information correctly intRes1 = (2-year/100 + year/400); intRes2 = int(365.25 * year); intRes3 = int(30.6001 * (month + 1)); JDN = ((intRes1 + intRes2 + intRes3 + day) + 1720944.5); DayofWeek = ((JDN + 1) % 7); cout<<"The day of the week"<<"for" <<month<<day<<year<<"is"<<DayofWeek; if (DayofWeek == 0) cout<<"Sunday"; else if (DayofWeek == 1) cout<<"Monday"; else if (DayofWeek == 2) cout<<"Tuesday"; else if (DayofWeek == 3) cout<<"Wednesday"; else if (DayofWeek == 4) cout<<"Thursday"; else if (DayofWeek == 5) cout"Friday"; else if (DayofWeek == 6) cout<<"Saturday"; return ; }

Explanation / Answer

Please post your code in proper format. Your code is unreadable. there is no definition of int DayofWeek(int DayofWeek, int intRes1 = 0, int intRes2 = 0, int intRes3 = 0, int JDN = 0, bool dataOK = false);