Write a function JulianDays that takes two integer arguments formonths and days
ID: 3618568 • Letter: W
Question
Write a function JulianDays that takes two integer arguments formonths and days and returns the number of days since January 1inclusive this year 2010 (Jan 2 is considered 1 day from Jan 1, Feb1 is considered 31 days from Jan 1, etc). Use switch and caseconcepts from chapter 5 if needed. Verify that JulianDays (4, 15)is 31 + 28 + 31 + 14 = 104.Make sure your JulianDays function covers the error case or displayerror messages when number of months or number of days in a monthis incorrect. For example JulianDays (13, 20) should return ameaningless value like -1 since there are no 13 months in thisyear, JulianDays (2, 30) should return meaningless values sincethere are 30 days in February, but JulianDays (3,30) should returnsome meaningful number
Test your program with February 11, July 4, Thanksgiving day, yourbirthday, and two erroneous dates
Explanation / Answer
please rate - thanks #include using namespace std; int JulianDays (int,int); int main() { int month,day,doy,; for(;;) { coutmonth; if(monthRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.