a program to create months in a year newbie question
I am supposed to do the following assignment as stated below can anyone tell me if I am going on the right direction?
Write and compile a C Program to declare an enumerated data type to hold values of 12 months in a year. Declare 12 variables of this data type initialized with 12 different months.
Code:
enum Months{
January,
February,
March,
April,
May,
June,
July,
August,
September,
October,
November,
December
};
#include <conio.h>
#include <stdio.h>
main(){
typedef enum months month;
month month1 = january;
getche();
}