3个人工资水平
来源:互联网 发布:软件著作权转让税率 编辑:程序博客网 时间:2024/05/02 02:31
#include<iostream>
using namespace std;
class Fqu{
public:
Fqu(double r=0.0);
void print();
Fqu operator+(Fqu c);
private:
double real;
};
Fqu::Fqu(double r)
{
real=r;
}
Fqu Fqu::operator +(Fqu c)
{
Fqu t;
t.real=real+c.real;
return t;
}
void Fqu::print()
{
cout<<"Allsalary is:"<<real<<endl;
}
int max(double q1,double q2)
{
if(q1>=q2)
return q1;
else
return q2;
}
int main()
{
char a[100];
char b[100];
char c[100];
double x,y,z;
double w,t;
while(cin>>a>>x>>b>>y>>c>>z)
{
cout<<a<<" "<<x<<endl;
cout<<b<<" "<<y<<endl;
cout<<c<<" "<<z<<endl;
Fqu A(x),B(y),C(z),D,E;
D=A+B;
E=C+D;
E.print();
w=max(x,y);
t=max(w,z);
if(t==x)
{
cout<<"The highest salary is:"<<a<<" "<<x<<endl;
}
else if(t==y)
{
cout<<"The highest salary is:"<<b<<" "<<y<<endl;
}
else if(t==z)
{
cout<<"The highest salary is:"<<c<<" "<<z<<endl;
}
}
return 0;
using namespace std;
class Fqu{
public:
Fqu(double r=0.0);
void print();
Fqu operator+(Fqu c);
private:
double real;
};
Fqu::Fqu(double r)
{
real=r;
}
Fqu Fqu::operator +(Fqu c)
{
Fqu t;
t.real=real+c.real;
return t;
}
void Fqu::print()
{
cout<<"Allsalary is:"<<real<<endl;
}
int max(double q1,double q2)
{
if(q1>=q2)
return q1;
else
return q2;
}
int main()
{
char a[100];
char b[100];
char c[100];
double x,y,z;
double w,t;
while(cin>>a>>x>>b>>y>>c>>z)
{
cout<<a<<" "<<x<<endl;
cout<<b<<" "<<y<<endl;
cout<<c<<" "<<z<<endl;
Fqu A(x),B(y),C(z),D,E;
D=A+B;
E=C+D;
E.print();
w=max(x,y);
t=max(w,z);
if(t==x)
{
cout<<"The highest salary is:"<<a<<" "<<x<<endl;
}
else if(t==y)
{
cout<<"The highest salary is:"<<b<<" "<<y<<endl;
}
else if(t==z)
{
cout<<"The highest salary is:"<<c<<" "<<z<<endl;
}
}
return 0;
}
代码如上
有点水
欢迎 自己写
0 0
- 3个人工资水平
- IT 工资水平
- 可视化工资水平
- 印度程序员工资水平
- 各城市工资水平参照
- 各地工资水平比较
- 真实的IT界内工资水平
- 国内IT外企的工资水平
- 略见一斑之全国.net工资水平大概
- [双语阅读]调查:瑞士工资水平居全球之首
- IT行业人才工资水平曝光,收入情况调查,薪水揭密
- 2013年7月杭州java程序员工资水平调查
- 一年外包工作经验深圳辞职后工资水平能达到多少?
- 为什么说程序员的前三年不要太看重工资水平?
- 2014互联网公司应届生工资水平,供15求职参考
- 个人工作总结模板3
- sql个人总结3
- 个人总结3
- 第8课 LCD控制驱动
- 路由子系统——Scope
- Solr之客户端SolrJ
- PHP 500 -Invalid command RewriteEngine的解决 wamp问题1
- ajax之“解读原生态ajax”
- 3个人工资水平
- JSP学习笔记1(声明,输出表达式,脚本,page,include,forward,usebean,setproperty,getproperty)
- Solr之关系型数据库导入数据
- wamp问题2 不能用任务栏wamp的工具生成alias
- window.showModalDialog以及window.open用法简介
- 安卓作业—词典
- 查询功能的实现
- 音乐—带开始结束
- Solr之常见配置