Question: Language: C Programming // produce result: January 1st is the 1st day of the year. January 31st is the 31st day of the year. February

Language: C Programming

// produce result:

"January 1st is the 1st day of the year. January 31st is the 31st day of the year. February 1st is the 32nd day of the year. February 28th is the 59th day of the year. March 1st is the 60th day of the year. March 15th is the 74th day of the year. December 31st is the 365th day of the year."

#include

int print_ordinal_day(int month, int day);

int main(void)

{

// expected result: 1

print_ordinal_day(1, 1);

// expected result: 31

print_ordinal_day(1, 31);

// expected result: 32

print_ordinal_day(2, 1);

// expected result: 59

print_ordinal_day(2, 28);

// expected result: 60

print_ordinal_day(3, 1);

// expected result: 74

print_ordinal_day(3, 15);

// expected result: 365

print_ordinal_day(12, 31);

return 0;

}

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!