Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please make sure the output matches with the given result below. 2. Code your program in the file named w3p1.c IMPORTANT: DO NOT use arrays

Please make sure the output matches with the given result below.

image text in transcribedimage text in transcribed

2. Code your program in the file named "w3p1.c" IMPORTANT: DO NOT use arrays in this workshop! 3. After the system library #include, and before the main function, define two (2) macros: #define MIN_YEAR 2010 #define MAX_YEAR 2021 4. Inside the main function, declare two (2) unmodifiable integer variables "JAN" and "DEC" representing the first and last months of the year respectively (initialize "JAN" to 1 and "DEC" to 12) 5. Display the title for the well-being log application 6. Nest inside an iteration construct the following: a) Display the following message: >Set the year and month for the well-being log (YYYY MM): *** Log date set! **** 9. Display the log start date in the format: YYYY-MMM-DD YYYY: The year as 4-digits MMM: First 3-characters of the month name DD: The 2-digit day Note: The log will start on the 1st day of the month entered by the user Hint: You need to implement alternative/multiple selection to map the month integer value to the respective 3-character month representation. There are a couple of constructs available to you that will make this possible! Part-1 Output Example (Note: Use this data for submission) General Well-being Log Set the year and month for the well-being log (YYYY MM): 2009 1 ERROR: The year must be between 2010 and 2021 inclusive Set the year and month for the well-being log (YYYY MM): 2022 1 ERROR: The year must be between 2010 and 2021 inclusive Set the year and month for the well-being log (YYYY MM): 2021 @ ERROR: Jan.(1) - Dec. (12) Set the year and month for the well-being log (YYYY MM): 2021 13 ERROR: Jan.(1) - Dec. (12) Set the year and month for the well-being log (YYYY MM): 2009 ERROR: The year must be between 2010 and 2021 inclusive ERROR: Jan.(1) Dec. (12) Set the year and month for the well-being log (YYYY MM): 2022 13 ERROR: The year must be between 2010 and 2021 inclusive ERROR: Jan.(1) - Dec. (12) Set the year and month for the well-being log (YYYY MM): 2021 2 *** Log date set! *** Log starting date: 2021-FEB-01

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

Step: 3

blur-text-image

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

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions