Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using c language in visual studio 2. Code your program in the file named w3p1.c IMPORTANT: DO NOT use arrays in this workshop! 3. After

using c language in visual studio

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): b) Read from standard input (keyboard) the year and month (entered on the same line with a space between) assigning the input values to two integer variables (having meaningful names representing the data they store) c) Apply what you have learned about selection to define the necessary logic that will validate the values entered for the year and month. The entered year value must be between MIN_YEAR and MAX_YEAR inclusive The entered month value must be between JAN and DEC inclusive If any of the above validations fail, the respective error message(s) should be displayed (see example output to see what each error message should display) *** Log date set! ***

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

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions