Program to use the enum in c++


  #include<iostream>
using namespace std;
enum days{ sat=0, sun, mon, teu, wed, thirs, fri };
void main()
{
	int no; enum days d;
	cout << "Enter the day:";
	cin >> no;
	d = (days)no;
	if (d ==sat || d == sun){ cout << "Holidays" << endl; }
	else cout << "Working days" << endl;
	getchar();
	getchar();
}     

          

       
 

Comments

Popular posts from this blog

Multiple inheritance,friend function and multiple file in oop(object oriented programming)

Concepts of OOP (object oriented programming)

Concepts in c++........