#include<stdioh>
int main(void)
{
int a, b;
printf("工作了几个小时?");
scanf("%d",&a);
if(a<=4)
printf("%d元",25a);
else
b=a-4;
a=a-b;
printf("%d元",30b+25a);
return 0;
}
#include <stdioh>
int main()
{
int hours;
float wage;
float salary;
scanf("%d%f",&hours,&wage);
salary=hourswage(1-01);
printf("the salary should be $f\n",salary);
}
int CaculateSalary(int WorkTime) //传入上班时间,返回工资
{
if(200<WorkTime&&WorkTime<=250) //上班时间在200-250
return 4000+WorkTime10;
else if(WorkTime>250) //上班时间在250以上
return 4000+WorkTime20;
else if(WorkTime<200&&WorkTime>=150) //上班时间在150-200
return 4000-(200-WorkTime)10;
else //上班时间在200以下
return 4000-(200-WorkTime)20;
}
#include
<stdioh>
void
main(
)
{
int
n
=
0
,
i
=
0
;
float
total_salary
=
00,
every_salary
=
00
;
scanf("%d",
&n)
;
/
输入要计算的
n
个人
/
for(
i
=
1
;
i
<=
n
;
i
++
)
{
scanf("%f",
&every_salary)
;
/
输入每一个人的薪水
/
total_salary
+=
every_salary
;
/
全部薪水变量进行累加
/
}
printf("Average
salary
is:
%f\n",
total_salary/n)
;
/
循环结束后输出
n
个人的平均工资
/
}
代码一
public double earnings()
{double a=50000456;
return a;
}
代码二
public double earnings()
{double b=2000;
return 12b;}
代码三
public double earnings()
{double c=500;
return 52c;}
代码四
我也正在思考中
vb编写程序计算公积金和应发工资(劳动时间每小时工资数09)代码如下:
private sub command1_click()t=val(inputbox("请输入劳动时间"))
g=val(inputbox("请输入每小时工资数"))
'计算除去公积金后应发工资公式
j=tg09
msgbox "应发工资=" & j
end sub
#include<iostreamh>
class enployee
{
protected:
char ID[10];
char name[10];
float money;
char kd;
public:
virtual void print()
{
cout<<"ID:"<<ID<<endl<<"姓名:"<<name<<endl<<"工资:"<<money<<endl<<"类型:"<<kd<<endl;
}
} ;
class manager:public enployee
{
public :
manager();
void print()
{
cout<<"ID:"<<ID<<endl<<"姓名:"<<name<<endl<<"工资:"<<money<<endl<<"类型:"<<kd<<endl;
}
} ;
manager::manager()
{
cout<<"输入ID:";
cin>>ID;
cout<<"输入姓名:";
cin>>name;
money=5000;
kd="manager";
}
class worker:public enployee
{
public :
worker();
void print()
{
cout<<"ID:"<<ID<<endl<<"姓名:"<<name<<endl<<"工资:"<<money<<endl<<"类型:"<<kd<<endl;
}
} ;
worker::worker()
{
cout<<"输入ID:";
cin>>ID;
cout<<"输入姓名:";
cin>>name;
cout<<"输入件数目:";
float number=0;
cin>>number;
money=20number;
kd="worker";
}
class salesman:public enployee
{
public :
salesman();
void print()
{
cout<<"ID:"<<ID<<endl<<"姓名:"<<name<<endl<<"工资:"<<money<<endl<<"类型:"<<kd<<endl;
}
} ;
salesman::salesman()
{
cout<<"输入ID:";
cin>>ID;
cout<<"输入姓名:";
cin>>name;
cout<<"输入销售额:";
float number=0;
cin>>number;
money=500+003number;
kd="salesman";
}
void main()
{
cout<<"经理"<<endl;
manager temp;
tempprint();
cout<<"记件工"<<endl;
worker temp1;
temp1print();
cout<<"销售员"<<endl;
salesman temp2;
temp2print();
}
# -- coding:utf-8 --
__author__ = 'Luo'
def salaryCalculate(day):
if day == 1:
print(u"第%d天工资为:%d"%(day,20))
return 20
salary = salaryCalculate(day-1)2
print(u"第%d天工资为:%d"%(day,salary))
return salary
if __name__ == "__main__":
salaryCalculate(20)
以上就是关于c语言编写程序,输入工作时间,计算某小时工薪酬全部的内容,包括:c语言编写程序,输入工作时间,计算某小时工薪酬、c语言编程题 某工种按小时计算工资,每月劳动时间(小时)×每小时工资=总工资,总工资中扣除10%、按照下面的具体要求编写程序计算工资.(工人月基本工资4000元,正常上班时间为200个小时。)等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)