C PROGRAMMING ONLY) 1. Dealing With Months by CodeChum Admin We're done dealing with days. It's time to step up and now deal with months! Instructions: In the code editor, you are provided with a code in the main() which has 12 printf's. Each printf prints a month with its corresponding value. For this program, January is 1, February is 2, March is 3, and so on. When you run the initial code, you will encounter errors because these month names that have been printed don't exist yet. Your task is to create an enum data type which contains these month names as values so that when we run the code, there will be no more error. Do not edit anything in the main(). Output January = 1 February = 2 March = 3 April = 4 May = 5 June = 6 July = 7 August = 8 September = 9 October = 10 November = 11 December = 12
(C
1. Dealing With Months
by CodeChum Admin
We're done dealing with days. It's time to step up and now deal with months!
Instructions:
In the code editor, you are provided with a code in the main() which has 12 printf's. Each printf prints a month with its corresponding value. For this program, January is 1, February is 2, March is 3, and so on. When you run the initial code, you will encounter errors because these month names that have been printed don't exist yet.
Your task is to create an enum data type which contains these month names as values so that when we run the code, there will be no more error.
Do not edit anything in the main().
Output
January = 1
February = 2
March = 3
April = 4
May = 5
June = 6
July = 7
August = 8
September = 9
October = 10
November = 11
December = 12
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images