/* *copyright (c) 2016, College of Computer and Control engineering, Yantai University *all rights reserved * File name: 123.cpp * Author: Zong Tao * Completion date: March 13, 2016 * version number: v1.0 * * Problem Description: Write Select the structure program, enter the total monthly income of the individual, calculate its tax payable this month and after-tax income. * Input Description: An integer representing the total monthly income of the individual. * Program output: Two numbers, the sub-table represents this month's tax payable and after-tax income. */#include <iostream>using namespace Std;int main () {int t; Double dsalary,dtax=0,dnetincome=0; cout<< "Please enter your total revenue for this month (yuan):"; cin>>dsalary; t=dsalary-3500; if (t<=0) {dtax=t; } else if (t<=1500) {dtax=t*0.03; } else if (t<=4500) {dtax= (t*0.1)-105; } else if (t<=9000) {dtax= (t*0.2)-555; } else if (t<=35000) {dtax= (t*0.25)-1005; } else if (t<=55000) {dtax= (t*0.3)-2755; } else if (t<=80000) {dtax= (t*0.35)-5505; } else {dtax= (t*0.45)-13505; } Dnetincome=dsalary-dtax; cout<< "You should pay personal income tax this month <<dTax<<" yuan, after-tax income is "<<dNetIncome<<" Yuan. \ n "; cout<< "pay taxes according to law and share prosperity." Thanks for using! \ n "; return 0;}
Operation Result:
Calculate Monthly Income