用C++语言设计一个员工工资管理程序,有数据录入、存储、显示、修改和删除功能。

2024-12-25 16:38:01
推荐回答(3个)
回答1:

#include
#include
using namespace std;
class worker
{
public:
worker(int n,string nam ,float w):num(n),name(nam),wage(w){}
void display()
{
cout<<"num:"< cout<<"name:"< cout<<"wage:"< }
private:

int num;
string name;
float wage;
};

int main ()
{
worker a[5]={
worker(1,"zhangsan",750),
worker(2,"lisi",850),
worker(3,"wangba",650),
worker(4,"zhaoliu",900),
worker(5,"wangqi",1000)
};
cout<<"the information of five workers:"< for(int i=0;i<5;i++)
{a[i].display();
cout< return 0;
}

回答2:

联系我,我发给你!

回答3:

CAI