Question: In C Code 1. Holiday Locater (holiday.c) Write a program that prompts user to enter a number and outputs the corresponding month and federal holidays

In C Code

In C Code 1. Holiday Locater (holiday.c) Write a program that prompts

1. Holiday Locater (holiday.c) Write a program that prompts user to enter a number and outputs the corresponding month and federal holidays that fall in that month, i.e., 1: New Years Day, 12: Christmas Day, etc. You need to use switch statement instead of if else statement for this program. If user enters a number greater than 12 or less than 1, it should display an error message mentioning that "The input is invalid". Sample Output: Enter the number: 11 November: Thanksgiving Day Enter the number: 4 April: NONE Enter the number: 13 The input is invalid The following chart of months and holidays (source: wikipedia page on federal holidays in the US) should be used to determine what counts as a federal holiday for the purposes of this assignment: Month Holiday January New Year's Day, Birthday of Martin Luther King, Jr. February Washington's Birthday March NONE April NONE May Memorial Day June NONE July Independence Day August NONE September Labor Day October Columbus Day November Veterans Day, Thanksgiving Day December Christmas Day Data Type Requirement: Input data should be of type int. Input Validation: Input should be a valid month

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!