⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wage.cpp

📁 我做的东西还算不错的饿
💻 CPP
字号:
#include<iostream.h>
struct admin
{ 
	float wage;
    int   age;
};
struct worker
{
	float wages;
	int   hour;
	int   ages; 
};
struct messager
{
	float wagess;
	int   agess;
	float get;
};
struct workers
{
	float wagers;
	float gets;
};
double admins()
{ 
	admin s;
    double h;
	cout<<"输入管理员的工资和工龄年"<<endl;
    cin>>s.wage>>s.age;
    return h=s.wage+(s.age*50);
}
double workerss()
{  
	worker s;
	double h;
	cout<<"输入工人的工资,工时和工龄"<<endl;
	cin>>s.wages>>s.hour>>s.ages;
	return h=s.wages+(100*s.hour)+(s.ages*50);
}
double messagers()
{   
	messager s;
	double h;
	cout<<"输入销售经理的工资,工龄和销售量"<<endl;
	cin>>s.wagess>>s.agess>>s.get;
	return h=s.wagess+(s.agess*50)+(s.get*0.005);
}
double workeres()
{
	workers s;
	double h;
	cout<<"输入销售员的工龄和销售量"<<endl;
	cin>>s.wagers>>s.gets;
	return h=(50*s.wagers)+(s.gets*0.05);
}
void main()
{   int a;
  do{	
     cout<<"1.管理员"<<endl<<"2.工人"<<endl<<"3.销售经理"<<endl<<"4.销售员"<<endl<<"5.exit"<<endl;
     cin>>a;
	 if(a==1) cout<<"管理员为"<<admins()<<"元"<<endl;
     if(a==2) cout<<"工人为"<<workerss()<<"元"<<endl;
	 if(a==3) cout<<"销售经理为"<<messagers()<<"元"<<endl;
     if(a==4) cout<<"销售部"<<workeres()<<"元"<<endl;  
  }while(a!=5);
    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -