(Move to ...)
▼
Program to illustrate Enumerated Data Type
#include<iostream.h>
enum Semester {WINTER, MONSOON, SUMMER};
int main( )
{
Semester s1, s2 ; // Declaration of variables of type Semester
s1 = MONSOON ;
s2 = WINTER ;
if (s1 == s2)
cout <<"same semester"<<endl;
return 0 ;
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment