Skip to content

Instantly share code, notes, and snippets.

@programmingfaster0226
Created June 4, 2018 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save programmingfaster0226/46aa3ec77afdc7b5e7a42e446b615774 to your computer and use it in GitHub Desktop.
Save programmingfaster0226/46aa3ec77afdc7b5e7a42e446b615774 to your computer and use it in GitHub Desktop.
programmingfaster.com
#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