当前位置:网站首页>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;
}
边栏推荐
- Qt学习25 布局管理器(四)
- Uniapp skills - scrolling components -1
- Go language web development series 30: gin: grouping by version for routing
- Qt学习24 布局管理器(三)
- RocksDB LRUCache
- 如何使用lxml判断网站公告是否更新
- Redis: redis data structure and key operation commands
- Toast UI editor (editor allows you to edit your markup document using text or WYSIWYG, with syntax highlighting, scrolling synchronization, real-time preview and chart functions.)
- Back to top implementation
- Qt学习23 布局管理器(二)
猜你喜欢
Scroll detection of the navigation bar enables the navigation bar to slide and fix with no content
[email protected])"/>
金属有机骨架(MOFs)抗肿瘤药载体|PCN-223装载甲硝唑|UiO-66包载盐酸环丙沙星([email protected])
How to use lxml to judge whether the website announcement is updated
allegro,orcad, net alias,port,off-page connector之间的异同点和如何选取
GoLand 2021.1: rename the go project
MySQL data processing value addition, deletion and modification
QT learning 23 layout manager (II)
如何使用lxml判断网站公告是否更新
使用vscode查看Hex或UTF-8编码
小项目(servelt+jsp+mysql+EL+JSTL)完成一个登录功能的Servlet,具有增删改查的操作。实现登录身份验证,防止非法登录,防止多点登录,记住用户名密码功能。
随机推荐
JVM object lifecycle
28: Chapter 3: develop Passport Service: 11: define attributes in the configuration file, and then obtain them in the code;
Vite project commissioning
allegro,orcad, net alias,port,off-page connector之间的异同点和如何选取
Why are grass-roots colleges and universities with "soil and poverty" called "Northeast small Tsinghua"?
Redis:字符串类型数据的操作命令
[combinatorics] permutation and combination (two counting principles, examples of set permutation | examples of set permutation and circle permutation)
jvm-运行时数据区
Back to top implementation
Implementation of Muduo accept connection, disconnection and sending data
Common plug-ins for vite project development
玖逸云黑免费无加密版本源码
Page generation QR code
Collection of mobile adaptation related articles
[bw16 application] instructions for firmware burning of Anxin Ke bw16 module and development board update
Another industry has been broken by Chinese chips. No wonder the leading analog chip companies in the United States have cut prices and sold off
Onmenusharetimeline custom shared content is invalid, and the title and icon are not displayed
Qt学习20 Qt 中的标准对话框(中)
3D vision - 2 Introduction to pose estimation - openpose includes installation, compilation and use (single frame, real-time video)
Solve the problem of dormitory router campus network sharing login