Example-1
# include < iostream.h > 
enum days_of_week {Sun = 1, Mon, Tue, Wed, Thu, Fri, Sat}; 
void main()
{
days_of_week day1, day2;
day1 =Mon; day2=Thu;
int diff day2-day1;
cout << "Days between = "<< diff << endl;
if (dayl < day2)
cout << "day1 comes before day2 \n";
}



Next >>
<< back

Our aim is to provide information to the knowledge seekers. 


comments powered by Disqus


Footer1