Question: Write a program in C++ 3. Using the functions shown in class (leap, days_in_month, valiDATE) write another function that will convert a date of the

Write a program in C++

3. Using the functions shown in class (leap, days_in_month, valiDATE) write another function that will convert a date of the form MM DD YYYY to the Julian date form DDD.YYYY where DDD is the day of the year. Your main program will prompt the user to enter a date in MM DD YYYY form. It will then call the valiDATE function to make sure the date is correct. (You can begin with the example program (Links to an external site.)Links to an external site. we did in class.) Following validation the main program will call your convert function to produce the Julian date. Print out the dates in normal MM DD YYYY and DDD.YYYY form.

Example: 01 25 2016 will convert to 025.2016 and 12 31 2016 will convert to 366.2016.

NOTE: You do not need to search for some formula to do this problem. Simply use the functions to add up all the days in the prior full months then add the date of the current month to get total. For example March 20 2016. Add all the days in January to all the days in February (2016 is a leap year) then add 20.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!