[SOLVED] write a function that will return the number of days between 1 Jan 2017

15.00 $

Programming resource
, Digital learning resource
Categories: ,
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

Rate this product
Using Sunday, 1 Jan 2017 as the reference, {1} write a function that will return the number of days between 1 Jan 2017 and a given date in 2017, {2} write another function that will return the days of the week of the given date. You can codify the day of the week with values 0-6. Your two function prototypesmay look like this:

intnum_days_btwn_dates(date, date);

intday_of_week(date);

Write a program using the above function to print thr number of days from 1 Jan 2017 to a given date and the day of the week of the given date. So a dialouge of your prgram could be(bold is user input):

Enter the date of in the form of yyyy mm dd: 2017 5 20

The number of days from 1-1-2017 to 20-5-2017 is 139.

20-5-2017 is a Saturday

Note that you should print the day of the week in word not in number.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.