Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 monthStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started