/* using constants enum */
#include
void main()
{
enum colors {RED,GREEN,BLUE};
clrscr();
printf("\n The value of RED=%d",RED);
printf("\n The value of GREEN=%d",GREEN);
printf("\n The value of BLUE=%d",BLUE);
getch();
}
#include
void main()
{
enum colors {RED,GREEN,BLUE};
clrscr();
printf("\n The value of RED=%d",RED);
printf("\n The value of GREEN=%d",GREEN);
printf("\n The value of BLUE=%d",BLUE);
getch();
}
No comments:
Post a Comment