#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. list转换string

    方法1 "".join 若list中为字符型 str = "".join(list) >>> L=['a','b','c'] >> ...

  2. 分享一个VueCli 3.0的项目模板

    个人搭建的Vue项目模板 默认自带  Vuex  Less 封装内容如下 vue.config axios 封装 vue 配置环境文件 vue 自定义路径映射 (cli3.0取消了默认@ 映射src的 ...

  3. 基于WebGL/Threejs技术的BIM模型轻量化之图元合并

    伴随着互联网的发展,从桌面端走向Web端.移动端必然的趋势.互联网技术的兴起极大地改变了我们的娱乐.生活和生产方式.尤其是HTML5/WebGL技术的发展更是在各个行业内引起颠覆性的变化.随着WebG ...

  4. Lua教程

    Lua中的类型与值 Lua中的表达式 Lua中的语句 Lua中的函数 Lua中的闭包 Lua 中 pairs 和 ipairs 的区别 Lua中的迭代器与泛型for Lua中的协同程序 Lua中__i ...

  5. django会话

    django会话 可以把会话理解为客户端与服务器之间的一次会晤,在一次会话过程中有多次请求和响应,但是由于HTTP协议的特性-->无状态,每次浏览器的请求都是无状态的,无法保存状态信息,也就是说 ...

  6. Vue.js学习笔记(介绍)

    Vue语法也可以进行APP开发,需要借助weex Vue.js是一套构建用户界面的框架,只关注视图层,便于与第三方库或既有项目整合. 在Vue中的核心概念:让用户不能操作Dom元素(减少不必要的dom ...

  7. pod BaiduMapKit 报错解决方案

    错误信息 [!] Error installing BaiduMapKit [!] /usr/bin/git clone https://github.com/BaiduLBS/BaiduMapKit ...

  8. P3966 [TJOI2013]单词

    P3966 [TJOI2013]单词 题目描述 小张最近在忙毕设,所以一直在读论文.一篇论文是由许多单词组成但小张发现一个单词会在论文中出现很多次,他想知道每个单词分别在论文中出现了多少次. 输入输出 ...

  9. centos 7.5+如何格式化硬盘

    [root@k8s-node2 ~]# fdisk -l Disk /dev/sdb: bytes, sectors Units = sectors of * = bytes Sector size ...

  10. linux安装postgresql简洁版

    环境: linux 7.+ postgresql 10.5 1.下载10.5版本的源码,make后成可执行版本 2.创建数据库   initdb -D   /xxx/yyy(对应为数据目录,提前创建好 ...