ENUMERATION




SOURCE CODE

#include “iostream.h”
#include “conio.h”

enum day{MONDAY=1,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY};

int main()
{
int day;
clrscr();
cout << "Enter The Day Number : "; cin >> day;
if((day==SATURDAY)(day==SUNDAY))
cout << "WEEKEND"; else if((day > =MONDAY)(day < =FRIDAY)) cout << "WORKING DAY"; else cout << "INVALID NUMBER"; getch(); return 0; } OUTPUT


Enter The Day Number : 2
WORKING DAY

Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24