Answer with c program and use switch function 2021Enter occurrence number -> 1Start of week: Friday January 1, 2021End of week: Thursday January 7, 2021January-=-=---=-=-=-=-=-=-:---=-Sun Mon...


Answer with c program and use switch function


Problem: Given as input the year and occurrence number determine when that week begins and ends. Display the week<br>which will begin on the same day of the week as January 1ª of the specified year. There is no input validation required for<br>this assignment. The input given will represent a “Start of week
2021 Enter occurrence number -> 1 Start of week: Friday January 1, 2021 End of week: Thursday January 7, 2021 January -=-=---=-=-=-=-=-=-: ---=- Sun Mon Tue Wed Thu Fri Sat 2 3 4 5 6 7 Example Execution #2 (it is possible for a week to begin in one month and end in the next month): Enter year number -> 2020 Enter occurrence number -> 9 Start of week: Wednesday February 26, 2020 End of week: Tuesday March 3, 2020 February -=-----=-=-=-=- ---=- Sun Mon Tue Wed Thu Fri Sat 26 27 28 29 1 2 3 Example Execution #3 (it is possible for a week to begin in one year and end in the next year): Enter year number -> 2021 Enter occurrence number -> 53 Start of week: Friday December 31, 2021 End of week: Thursday January 6, 2022 December -=-=-=-=-=-=-=-=-=-= =-=-=- Sun Mon Tue Wed Thu Fri Sat 31 3 4 "/>
Extracted text: Problem: Given as input the year and occurrence number determine when that week begins and ends. Display the week which will begin on the same day of the week as January 1ª of the specified year. There is no input validation required for this assignment. The input given will represent a “Start of week" date that occurs in the year specified. On page 300 of your C programming text there are several useful formulas given as part of problem 60. All input will be integer data and your program will only be tested with years from 1800 to 2100. Notice that the name of the month is roughly centered above the 'e' in Wed. Example Execution #1: Enter year number -> 2021 Enter occurrence number -> 1 Start of week: Friday January 1, 2021 End of week: Thursday January 7, 2021 January -=-=---=-=-=-=-=-=-: ---=- Sun Mon Tue Wed Thu Fri Sat 2 3 4 5 6 7 Example Execution #2 (it is possible for a week to begin in one month and end in the next month): Enter year number -> 2020 Enter occurrence number -> 9 Start of week: Wednesday February 26, 2020 End of week: Tuesday March 3, 2020 February -=-----=-=-=-=- ---=- Sun Mon Tue Wed Thu Fri Sat 26 27 28 29 1 2 3 Example Execution #3 (it is possible for a week to begin in one year and end in the next year): Enter year number -> 2021 Enter occurrence number -> 53 Start of week: Friday December 31, 2021 End of week: Thursday January 6, 2022 December -=-=-=-=-=-=-=-=-=-= =-=-=- Sun Mon Tue Wed Thu Fri Sat 31 3 4
Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here