返回

c++-这个问题有什么帮助吗?

发布时间:2022-08-28 23:50:31 275
# golang
#include
#include
#include
#include 

using namespace std;

class Employee
{
int emp_number;
float Salary, annual_salary, total_grossw, employee_type;
public:
void read_emp_details(int count){
cout<<"\n\n*** Enter Employee "<<count<<" Details ***";
cout<<"\n:Enter Employee Type ";
cin>>employee_type;
cout<<"\nAnnual Salary: ";
cin>>annual_salary;
cout<<"\n:Total Gross Wage ";
cin>>total_grossw;
cout<<"\n---- Employee "<<count<<" Datails are saved ----\n\n";
}


}

 void display_emp_details(int count){
  cout<<"\n\n*** Employee "<<count<<" Details ***\n";
  cout<<"\nEmployee Type    :employee_type ";
  cout<<"\nTotal Gross Wage: "<<total_grossw;
  cout<<"\n--------------------------\n";
   }
 }
 int main(){
 Employee emp[100];
int number_of_emp, count;
cout<<"\nPlease enter the number of employee wages to be calculated(100 max): ";
cin>>number_of_emp;
for(count=0; count< number_of_emp; count++){
 emp[count].read_emp_details(count+1);
 }
for(count=0; count < number_of_emp; count++){
  emp[count].find_net_salary();
}
for(count=0; count < number_of_emp; count++){
  emp[count].display_emp_details(count+1);
}
cout<<"\nPress any key to close!!!";
getch();
return 0;

int employee_type;

if (employee_type == "salaried" || employee_type == "hourly")
    cout << "You picked salary pay or hourly\n";
 else
  cout << "You did not pick salaried or hourly \n";
 return 0;

if (employee_type="salaried")
cout << "Enter the Annual Salary : ";
    cin >> annual_salary;
    cin >> input_total_grossw
input_total_grossw = annual_salary / 24 =      
  }

 

特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报
评论区(0)
按点赞数排序
用户头像