Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions enum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@
#include <stdlib.h>
using namespace std;

enum Company{
Google = 1, Facebook, Twitter, Snapdeal, Microsoft
enum Company {
Google = 1,
Facebook,
Twitter,
Snapdeal,
Microsoft
};

int main(int argc, char const *argv[]){
int main(int argc, char const *argv[]) {

int choice;

repeat:
cout << "Please enter a choice : ";
cin >> choice;
switch(choice){

switch(choice) {
case Google:
cout << "You have chosen Google.";
break;
Expand All @@ -33,6 +39,7 @@ int main(int argc, char const *argv[]){
goto repeat;
break;
}

return 0;
}

}