Advertisement
PremFTW

class 1

Apr 9th, 2020
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. #include<iostream>
  2. #include<string>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     cout<<"The Performance Levels:"<<endl;
  8.     cout<<"1. Fair"<<endl;
  9.     cout<<"2. Good"<<endl;
  10.     cout<<"3. Execellent"<<endl;
  11.    
  12.     enum level{Fair = 1, Good, Execellent};
  13.    
  14.     int choice;
  15.    
  16.     cout<<"What is your choice? (enter numbers)"<<endl;
  17.     cin>>choice;
  18.    
  19.     switch(choice)
  20.     {
  21.         case Fair:
  22.             cout<<"Your performace is fair."<<endl;
  23.             break;
  24.         case Good:
  25.             cout<<"Your performance is Good."<<endl;
  26.             break;
  27.         case Execellent:
  28.             cout<<"Your performance is Execellent."<<endl;
  29.             break;
  30.         default:
  31.             cout<<"Enter a vanumber between 1 to 3"<<endl;
  32.             break;
  33.     }
  34.    
  35.     return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement