Question: Can you help me write code for this problem? 2. Write a program that uses an enumeration: Use enumeration to declare the following types RED=
2. Write a program that uses an enumeration: Use enumeration to declare the following types RED= 18 ORANGE 19 YELLOW = 5 GREEN 6 BLUE = 7 INDIGO 14 VIOLET= 15 The catch to this assignment is that you can only declare 3 elements of the enu meration, and you cannot change the order of the elements. The enumeration looks like this: 1 enum color a 1 RED, ORANGE, YELLOW, GREEN, BLUE, INDIGO, VIOLET Your job is to correctly declare only three of the types and let the compiler do the rest of the work. Save this file as lab4.q2.c and make a script called lab4.q2.script. Your program should print the color and its corresponding number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
