当前位置:网站首页>7-10 calculate salary
7-10 calculate salary
2022-07-03 14:09:00 【ᯤ⁹ᴳ⁺ ·】
7-10 Calculate wages (15 branch )
The salary calculation method of employees in a company is as follows : Work no more than... In a week 40 Hours , Pay according to normal working hours ; beyond 40 Hours of working time , Paid for normal working hours 1.5 Double pay . Employees are divided into new employees and old employees according to the time of entering the company , Not less than 5 The employees in are old employees ,5 Those less than years are new employees . The normal salary of new employees is 30 element / Hours , The normal salary of old employees is 50 element / Hours . Please calculate the employee's salary according to this compensation method .
Input format :
Enter... On one line 2 A positive integer , It refers to the number of years of employment and working hours of an employee , Separated by spaces .
Output format :
Output the weekly salary of the employee in one line , Accurate to the decimal point 2 position .
sample input 1:
5 40
sample output 1:
2000.00
sample input 2:
3 50
sample output 2:
1650.00#include<stdio.h>
int main(){
int year,hour;
double salary=0;
scanf("%d %d",&year,&hour);
if(year<5&&hour<=40){
salary=hour*30;
}else if(year<5&&hour>40){
salary=40*30+(hour-40)*30*1.5;
}else if(year>=5&&hour<=40){
salary=hour*50;
}else if(year>=5&&hour>40){
salary=40*50+(hour-40)*50*1.5;
}
printf("%.2lf",salary);
return 0;
} 
边栏推荐
- [bw16 application] instructions for firmware burning of Anxin Ke bw16 module and development board update
- QT learning 25 layout manager (4)
- QT learning 17 dialog box and its types
- [combinatorics] permutation and combination (two counting principles, examples of set permutation | examples of set permutation and circle permutation)
- Summary of common error reporting problems and positioning methods of thrift
- Reflection -- basic usage
- Redis: commandes d'action pour les données de type chaîne
- Uio-66-cooh loaded bendamostine | hydroxyapatite (HA) coated MIL-53 (FE) nanoparticles | baicalin loaded manganese based metal organic skeleton material
- 全局事件总线
- Current situation, analysis and prediction of information and innovation industry
猜你喜欢

解决MySql 1045 Access denied for user ‘root‘@‘localhost‘ (using password: YES)

Qt学习23 布局管理器(二)

使用vscode查看Hex或UTF-8编码

Redis:字符串類型數據的操作命令

jvm-运行时数据区

Nucleic acid modified metal organic framework drug carrier | pcn-223 metal organic framework encapsulated ad adamantane | zif-8 encapsulated adriamycin (DOX)

Conversion function and explicit

可编程逻辑器件软件测试

Go language web development series 28: solve cross domain access of CORS with gin contrib / CORS

Uniapp tips - scrolling components
随机推荐
3D vision - 2 Introduction to pose estimation - openpose includes installation, compilation and use (single frame, real-time video)
使用vscode查看Hex或UTF-8编码
Qt学习22 布局管理器(一)
Print. JS -- web page file printing
Raft 协议
Article content typesetting and code highlighting
page owner特性浅析
Analysis of the characteristics of page owner
Qt学习24 布局管理器(三)
How to bold text in AI
Uniapp skills - dom display and hiding
allegro,orcad, net alias,port,off-page connector之间的异同点和如何选取
Go language web development series 30: gin: grouping by version for routing
MIL-100( Fe) 包裹小分子阿司匹林形成[email protected](Fe)|甘草次酸修饰金属有机框架材料UiO-66-NH2(简称UiO-66-NH2-GA)
Global event bus
JVM class loading
JS new challenges
消息订阅与发布
Redis:字符串類型數據的操作命令
Uniapp tips - scrolling components