0
How to create this program? Please help
request the user to enter their monthly income and then display the tax payable, by the following rules: (i)If their income is less than R5000.00, they don't need to pay any tax (ii) if their income is less than R10000.00, they have to pay tax at the rate of 10% for the amount above R5000.00 (iii) if their income is above R1000.00, they have to pay tax at rate of 15% for the amount above R5000.00 plus R5000.00
1 Answer
+ 4
#include <iostream>
using namespace std;
int main () {
long salary ;
cout<<"\n Enter your monthly salary : ";
cin>>salary;
if(salary<=5000) {
cout<<"\n No tax needed";
}
else if(salary>5000&&salary<10000) {
cout<<"\n You need to pay tax = "<<(10/100)*salary;
}
else {
cout<<"\n You need to pay tax = "<<(15/100)*salary;
}
return 0;
}