You must follow the instructions closely to get this formula right. Otherwise, it will not give you the correct result. You must preced it by the code I included. Here is the body of the function I have. You need to add the header to it, and this should work fine. Test it.
 
if (year < 0)
return 0;
else
{
    
    if (month < 3)
    {
        month += 12;
        year  -= 1;
    }
    weekDay = (day + 2*month + 3*(month+1)/5 + year +
               year/4 – year/100 + year/400 + 1) % 7;
    
    if (month > 12)
    {
        month -= 12;
        year  += 1 ;
    } 
    
    
}
return weekDay;

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!Use Discount Code “Newclient” for a 15% Discount!NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

 

"Is this question part of your assignment? We Can Help!"

Essay Writing Service