# include <iostream.h>
# include <conio.h>
int main()
{
float income=0;
int tax=0;
float r1=0.0;
float r2=0.1;
float r3=0.2;
float r4=0.3;
float r5=0.4;
float r6=0.5;
cout<<"Enter income:";
cin>>income;
if(income>=100,001)
tax=income*r6;
else if(income<=100,000 && income >=70,001)
tax=income*r5;
else if(income>=70,000 && income >=50,001)
tax=income*r4;
else if(income>=50,000 && income >=30,001)
tax=income*r3;
else if(income>=30,000 && income >=10,001)
tax=income*r2;
else if(income>=10,000 && income >0)
tax=income*r1;
cout<<"Income tax is :"<<tax;
getch() ;
}
sujanthi.kumari 0 Newbie Poster
WhiZTiM -3 Newbie Poster
Schol-R-LEA 1,446 Commie Mutant Traitor Featured Poster
tinstaafl 1,176 Posting Maven
Schol-R-LEA 1,446 Commie Mutant Traitor Featured Poster
ddanbe commented: Nice code +14
sujanthi.kumari commented: thanks +0
mridul.ahuja 4 Coding Enthusiast
ddanbe 2,724 Professional Procrastinator Featured Poster
new_developer 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.