Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data 29th British National Conference On Databases Bncod 2013 Oxford Uk July 2013 Proceedings Lncs 7968

Authors: Dan Olteanu ,Georg Gottlob ,Christian Schallhart

2013th Edition

3642394663, 978-3642394669

More Books

Students also viewed these Databases questions

Question

Discuss the history of human resource management (HRM).

Answered: 1 week ago