#include <iostream>
using namespace std;
const double N1=35000;
const int N2=15000;
const int N3=5000;
int main()
{
double salary;
double sui=0;
cout<<"Enter the salary: ";
while(cin>>salary && salary>=0)
{
if(salary<=N3)
{
sui=0;
//cout<<"税收= "<<sui<<endl;
}
else if(salary>N3 && salary<=N2)
{
sui=(salary-N3)*0.10+N3*0;
//cout<<"税收= "<<sui<<endl;
}
else if(salary>N2 && salary<=N1)
{
sui=(salary-N2)*0.15+(N2-N3)*0.10+N3*0;
//cout<<"税收= "<<sui<<endl;
}
else
{
sui=(salary-N1)*0.20+(N1-N2)*0.15+(N2-N3)*0.10+N3*0;
//cout<<"税收= "<<sui<<endl;
}
cout<<"sui= "<<sui<<endl;
cout<<"Enter the salary: ";
}
system("pause");
return 0;
}

编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习5的更多相关文章

  1. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习9

    #include <iostream> #include <fstream> #include <cstdlib> #include <string> ...

  2. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习8

    #include <iostream> #include <fstream> #include <cstdlib> const int SIZE=20; using ...

  3. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习7

    #include <iostream> #include <string> #include <cctype> using namespace std; int m ...

  4. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习6

    #include <iostream> #include <string> using namespace std; const int MSIZE=100; struct j ...

  5. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习4

    #include <iostream> using namespace std; const int strsize=30; const int BOPSIZE=5; void showm ...

  6. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习3

    #include <iostream> using namespace std; void showmenu(void) { cout<<"Please enter ...

  7. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习2

    #include <iostream> #include <cctype> using namespace std; const int MAXSIZE=10; int mai ...

  8. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习1

    #include <iostream>#include <cctype>using namespace std;int main(){ char ch; while((ch=c ...

  9. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第5章编程练习9

    #include <iostream>using namespace std;int main(){ int num; cout<<"Enter number of ...

随机推荐

  1. HTML基础之JS中的序列化和反序列化-----字符串的json类型与字典之间的相互转换

    前端向后端传递数据的时候不能直接传递对象(如,字典),只能发字符串,Jason就是一种字符串所以前端向后端发送数据的时候,需要将对象转换成字符串 如果前端向后端发送的是json类型,需要通过JSON. ...

  2. jsonp和CORS跨域实现

    一.jsonp,使用jquery封装的$.ajax,返回数据类型要设置为jsonp 示例: $.ajax({ type: 'get', contentType: "application/j ...

  3. 记事本:一些js案例以及DOM和BOM

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  4. JavaWeb之html

    html :Hyper Text Markup Language 超文本标记语言 超文本:比文本功能更加强大 标记语言:通过一组标签对内容进行描述的一门语言 html书写规则: 文件的后缀名:.htm ...

  5. python多任务抓取图片

    import re import urllib.request import gevent def download(image_download, images_path,i): headers = ...

  6. mysql登录报错“Access denied for user 'root'@'localhost' (using password: YES”)的处理方法

    环境 CentosOS 6.5 ,已安装mysql 情景 root密码忘记,使用普通用户无法登录 解决 问题一 无法使用mysql命令 参考文章:https://www.cnblogs.com/com ...

  7. xPath Helper插件

    xPath Helper插件 xPath helper是一款Chrome浏览器的开发者插件,安装了xPath helper后就能轻松获取HTML元素的xPath,程序员就再也不需要通过搜索html源代 ...

  8. jssdk防覆盖

    防覆盖 var isFromTuia = (function () { var tuiaDomains = ['tuisnake', 'localhost'] function GetUrlDomai ...

  9. pyspider

    Linux系统我使用CentOS.对于pycurl安装问题比较好解决,只需要先安装对应的开发包即可.执行如下命令: yum install python-devel curl-devel 分别安装py ...

  10. 手把手详解持续集成之GitLab CI/CD

    一.环境准备 首先需要有一台 GitLab 服务器,然后需要有个项目:这里示例项目以 Spring Boot 项目为例,然后最好有一台专门用来 Build 的机器,实际生产中如果 Build 任务不频 ...