-
-
Save programmingfaster0226/46aa3ec77afdc7b5e7a42e446b615774 to your computer and use it in GitHub Desktop.
programmingfaster.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
int main() | |
{ | |
enum COLORS{ | |
red, | |
green, | |
yellow, | |
white, | |
magneta, | |
blue, | |
purple, | |
cyan, | |
brown, | |
gray, | |
black, | |
orange | |
} ; | |
cout<<" enter the color number \t=" <<endl; | |
int color; | |
cin>>color; | |
switch(color){ | |
case red: | |
cout<<"the color is red guys !!\n"; | |
break; | |
case yellow: | |
cout<<"the color is green guys !!\n"; | |
break; | |
case white: | |
cout<<"the color is white guys !!\n"; | |
break; | |
case magneta: | |
cout<<"the color is magneta guys !!\n"; | |
break; | |
case blue: | |
cout<<"the color is blue guys !!\n"; | |
break; | |
case purple: | |
cout<<"the color is purple guys !!\n"; | |
break; | |
case cyan: | |
cout<<"the color is cyan guys !!\n"; | |
break; | |
case brown: | |
cout<<"the color is brown guys !!\n"; | |
break; | |
case gray: | |
cout<<"the color is gray guys !!\n"; | |
break; | |
case black: | |
cout<<"the color is black guys !!\n"; | |
break; | |
case orange: | |
cout<<"the color is orange guys !!\n"; | |
break; | |
default: | |
cout<<"thats not a valid input !!\n"; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment