2.代码示例
#include<iostream> using namespace std; int main(){ int n; double s=0; cout<<"请输入您的个人收入:"; cin>>n; cout<<"应缴纳税额为:"; if(n<3500){ s=0; } else if(n<5000){ s=(n-3500)*0.03; } else if(n<8000){ s=(n-5000)*0.1+45; } else if(n<12500){ s=(n-8000)*0.2+345; } else if(n<38500){ s=(n-12500)*0.25+1245; } else if(n<58500){ s=(n-38500)*0.3+7745; } else if(n<83500){ s=(n-58500)*0.35+13745; } else s=(n-83500)*0.45+22495; cout<<s; return 0; }
3.结果输出
标签:std,cout,示例,int,Day11,main From: https://www.cnblogs.com/cream867/p/17351688.html