Advertisement
userxbw

Company payment template c++,

Aug 30th, 2022 (edited)
1,065
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.52 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void dataEntryMess();
  6. void messLine();
  7. /*
  8. defines:
  9.  
  10. can be but doesn't necessary
  11. need to be used.
  12.  
  13. it's code it can be changed to
  14. suit yours and the programs needs
  15. */
  16. #define SALES_WORKER 500
  17. #define GROSS_SALES 6.5
  18.  
  19. enum class paycode
  20. { TEAM=1, SALES=2, PEICE=3, HOURLY=4, QUIT=-1};
  21.  
  22. int main(){
  23. char run='y';
  24. int c=0;
  25.  
  26. do
  27. {
  28. dataEntryMess();
  29. cin>>c;
  30.  
  31.  
  32.     /*
  33.     within each case starts your real work
  34.     of data gathering and processing
  35.     */
  36. switch(static_cast<paycode>(c)){
  37.     case paycode::TEAM:
  38.     cout<<"enter data collection \n"
  39.     <<"for Team Leaders\n";
  40.     break;
  41.     case paycode::SALES:
  42.     cout<<"Enter data collection \n"
  43.     <<"for Sales worker\n";
  44.     break;
  45.     case paycode::PEICE:
  46.     cout<<"Enter data collection \n"
  47.     <<"for Peiceworkers\n";
  48.     break;
  49.     case paycode::HOURLY:
  50.     cout<<"Enter data collection \n"
  51.     <<"for Hourly workers\n";
  52.     break;
  53.     case paycode::QUIT:
  54.     run='n';
  55.     break;
  56.     default:
  57.     break;
  58.     }// end switch
  59. }while(run == 'y');
  60. return 0;
  61. }
  62.  
  63. void dataEntryMess(){
  64. messLine();
  65. cout<<"Enter code for employee type\n"
  66. <<"1. Team Leader\n"
  67. <<"2. Sales worker\n"
  68. <<"3. Peiceworker\n"
  69. <<"4. Hourly worker\n";
  70. messLine();
  71. //<<"******************************\n"
  72. cout<<"*  Enter (negative one) -1 to quit    *\n";
  73. messLine();
  74. //<<"*                            *\n"
  75. //<<"******************************\n";
  76. }
  77.  
  78. void messLine(){
  79. for(int i=0;i<30;i++)
  80.     cout<<"*";
  81. cout<<"\n";
  82. }
  83.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement