Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


write a c program to calculate the income tax of the
employees in an organization where the conditions are given as.
(I.T. = 0 if income <100000
I.T = 10% if income _< 200000
it = 20% if income >_ 200000)

Answers were Sorted based on User's Feedback



write a c program to calculate the income tax of the employees in an organization where the conditi..

Answer / krishna kanth

include<stdio.h>
main()
{
int income,tax;
printf("enter the income");
scanf("%d",&income);
{
if(income<100000)
{
printf("no tax");
{
else
if(income<=200000)
{
tax=(income-100000)*0.1;
printf("tax is:%d",tax);
}
else
if(income>=200000)
{
tax=((income-100000)*0.2+(income-200000)*0.1);
printf("tax is:%d",tax);
}
}
printf("completed")
}

Is This Answer Correct ?    255 Yes 131 No

write a c program to calculate the income tax of the employees in an organization where the conditi..

Answer / johni

#include<stdio.h>
#include<conio.h>
void main()
{
float income;
char name;
int no;
float tax;
printf("Enter the name\n");
scanf("%s",name);
printf("Enter the number for more clarification\n");
scanf("%d",&n);
printf("Enter the income\n:);
scanf("%f",&income);
if(income<100000)
tax=0;
else if(income<200000)
tax=(income-200000)*0.1;
else
tax=20000+(income-200000)*0.2;
getch();
}

Is This Answer Correct ?    56 Yes 40 No

write a c program to calculate the income tax of the employees in an organization where the conditi..

Answer / marvin

#include <studio.h>
main()
{
double income, i_t;
int tax;

printf ("
Enter income: ");
scanf ("%lf", &income);

if (income<100000)
tax = 0;

if (income<200000 && income>=100000)
tax = 10;

if (income>=200000)
tax = 20;

i_t = income*tax/100;
printf ("
Income Tax = %lf",i_t);
}

Is This Answer Correct ?    27 Yes 18 No

write a c program to calculate the income tax of the employees in an organization where the conditi..

Answer / akshit mahajan

#include <stdio.h>
int main()
{
// declaring variables
float income;
printf("Enter your income
");
scanf("%f", &income);
float tax_for_1_lac_and_above = (income)*0.10; // no addition beause no tax is applicable for less than 1lac so no previous summation
float tax_for_2_lac_and_above = (income - 200000) * 0.20 + 10000; //+10000(10k) because 10% of 100000(1lac)(previous summation)
if (income >= 100000)
{
printf("Your tax is 10%% and the tax will be %0.2f", tax_for_1_lac_and_above);
}
else if (income >= 200000)
{
printf("Your tax is 20%% and the tax will be %0.2f", tax_for_2_lac_and_above);
}
else if (income < 100000)
{
printf("No tax");
}
return 0;
}

Is This Answer Correct ?    1 Yes 1 No

write a c program to calculate the income tax of the employees in an organization where the conditi..

Answer / mahikshit pandey

#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>


//==========================Base Class========================//

class iTax
{
public:
char name[90],ads[90],occ[90];
int ID;

void getit(char *a)
{
strcpy(occ,a);
cout<<"Enter your name: ";
gets(name);
cout<<"Enter your ID: ";
cin>>ID;
cout<<"Give your address in detail: ";
gets(ads);
}

void showit()
{

cout<<"
Name : "<<name;
cout<<"
Occupation :"<<occ;
cout<<"
ID No. : "<<ID;
cout<<"
Address : "<<ads;
}
}; //end of base class


//=================================================================//

class common:public iTax

{
public:
float sal,tax;

void get()
{
cout<<"How much you earn in a year: ";
cin>>sal;
if(sal<50000)
{
tax=sal*(.03);
cout<<"Your IncomeTax is= "<<tax<<"tk."<<endl;
}
if((sal>50000)&&(sal<=100000))
{
tax=sal*(.07);
cout<<"Your IncomeTax is= "<<tax<<"tk."<<endl;
}
if((sal>100000)&&(sal<=150000))
{
tax=sal*(.10);
cout<<"Your IncomeTax is= "<<tax<<"tk."<<endl;
}
if((sal>150000)&&(sal<=200000))
{
tax=sal*(.15);
cout<<"Your IncomeTax is= "<<tax<<"tk."<<endl;
}
if((sal>200000)&&(sal<=250000))
{
tax=sal*(.20);
cout<<"Your IncomeTax is= "<<tax<<"tk."<<endl;
}
if((sal>250000)&&(sal<=300000))
{
tax=sal*(.23);
cout<<"Your IncomeTax is= "<<tax<<"tk."<<endl;
}
if(sal>300000)
{
tax=sal*(.25);
cout<<"Your IncomeTax is= "<<tax<<"tk."<<endl;
}
}


void showc()
{
cout<<"
Salary : "<<sal<<" tk. in a year";
cout<<"
Tax : "<<tax<<" tk."<<"

";

}

};

//=========================================================//

class p0:public iTax
{

public:
float sal,tax;
void getz()
{
cout<<"Enter your salary in a year: ";
cin>>sal;
cout<<"You have no income tax.
";
}
void showz()
{
cout<<"
Salary : "<<" tk. in a year"<<sal;
cout<<"
Tax : 0 tk.";
}
};

//============================================================//

class p15:public iTax
{

public:
float sal,tax;
void getfn()
{
cout<<"Enter salary in a year: ";
cin>>sal;
tax=sal*(.15);
cout<<"The income tax is: "<<tax<<"tk."<<endl;
}
void showfn()
{
cout<<"
Salary : "<<" tk. in a year"<<sal;
cout<<"
Tax : "<<tax<<" tk."<<"

";
}
};


//===========================================================//

class p20:public iTax
{
public:
float sal,tax;
void getty()
{
cout<<"Enter salary in a year: ";
cin>>sal;
tax=sal*(.20);
cout<<"The income tax is: "<<tax<<"tk."<<endl;
}
void showty()
{
cout<<"
Salary : "<<" tk. in a year"<<sal;
cout<<"
Tax : "<<tax<<" tk."<<"

";
}
};

//==============================================================//

class p25:public iTax
{
public:
float sal,tax;
void gettf()
{
cout<<"Enter salary in a year: ";
cin>>sal;
tax=sal*(.25);
cout<<"The income tax is: "<<tax<<"tk."<<endl;
}
void showtf()
{
cout<<"
Salary : "<<" tk. in a year"<<sal;
cout<<"
Tax : "<<tax<<" tk."<<"

";
}
};


//=======================Main Function=======================//

int main()
{

common c[20];
p0 z[20];
p15 fn[20];
p20 ty[20];
p25 tf[20];
iTax it;

int i,j,index,ID;
char a[70];

clrscr();
do{
cout<<" INCOME TAX CALCULATION"
<<"

What do you want to do?
1.Asking for IncomeTax view."
<<"
2.Search
3.Exit.
"
<<"
Make your choice= ";
cin>>index;

switch(index)
{

case 1:
cout<<"
How many memebers ? ";
cin>>j;
if(j==0)
cout<<"Please enter a valid number.

";

for(i=1;i<=j;i++)
{
cout<<"
Enter occupation name: ";
cin>>a;

if((stricmp(a,"farmer")==0)||(stricmp(a,"student")==0))
{
z[i].getit(a);
z[i].getz();
}

else if(stricmp(a,"business")==0)
{
ty[i].getit(a);
ty[i].getty();
}
else if(stricmp(a,"export")==0)
{
tf[i].getit(a);
tf[i].gettf();
}
else if(stricmp(a,"engineer")==0)
{
fn[i].getit(a);
fn[i].getfn();
}
else
{
c[i].getit(a);
c[i].get();
}
}
break;


case 2:
cout<<"
Give ur employee ID=";
cin>>ID;

if((ID!=c[i].ID)&&(ID!=z[i].ID)&&(ID!=fn[i].ID)&&(ID!=ty[i].ID)&&(ID!=tf[i].ID))
cout<<"No match found.....

";


for(i=1;i<=j;i++)

{
if(ID==c[i].ID)
{
c[i].showit();
c[i].showc();
cout<<"Press any key.......

";
getch();
}

if(ID==z[i].ID)
{
z[i].showit();
z[i].showz();
cout<<"Press any key.......

";
getch();
}

if(ID==fn[i].ID)
{
fn[i].showit();
fn[i].showfn();
cout<<"Press any key.......

";
getch();
}

if(ID==ty[i].ID)
{
ty[i].showit();
ty[i].showty();
cout<<"Press any key.......

";
getch();
}

if(ID==tf[i].ID)
{
tf[i].showit();
tf[i].showtf();
cout<<"Press any key.......

";
getch();
}
} break;




case 3:
break;
default:
cout<<"
a
Wrong choice Try again...";
cout<<"
Press any key to return to main menu...";
getch();
break;
}



}while(index!=3);
return 0;

Is This Answer Correct ?    6 Yes 10 No

write a c program to calculate the income tax of the employees in an organization where the conditi..

Answer / marvin

#include <studio.h>
main()
{
double income, i_t;
int tax;

printf ("
Enter income: ");
scanf ("%lf", &income);

if (income<100000)
tax = 0;

if (income<=200000)
tax = 10;

if (income>200000)
tax = 20;

i_t = income*tax/100;
printf ("
Income Tax = %lf",i_t);
}

Is This Answer Correct ?    6 Yes 11 No

write a c program to calculate the income tax of the employees in an organization where the conditi..

Answer / manivannan

int I.T,income;

printf("Enter Your income");
scanf("%d",&income);

if(income<100000)
I.T=0;

elseif(income<200000)
I.T=income * 10/100;

elseif(income>200000)
I.T=income * 20/100;

income=income+I.T;

Is This Answer Correct ?    60 Yes 90 No

Post New Answer

More C Interview Questions

what is uses of .net

0 Answers  


Write a code to generate divisors of an integer?

0 Answers   Ericsson,


#include <stdio.h> int main ( int argc, char* argv [ ] ) { int value1 = 10; int value2 = 5; printf ( "\n The sum is :%d", value1 | value2 ); } This is the answer asked by some one to add two numbers with out using arithmetic operator?Yes this answer is write it given out put as 15.But how????? what is need of following line? int main ( int argc, char* argv [ ] ) how it work?what is the meaning for this line? please explain me.Advance thanks

9 Answers   Excel,


What are type modifiers in c?

0 Answers  


what do the 'c' and 'v' in argc and argv stand for?

0 Answers   TISL,


. Write a program to get a string and to convert the 1st letter of it to uppercase

2 Answers   HTC,


What is "Hungarian Notation"?

0 Answers   Celstream,


Hierarchy decides which operator a) is most important b) is used first c) is fastest d) operates on largest numbers

1 Answers  


what do you mean by inline function in C?

0 Answers   IBS, TCS,


In the below code, how do you modify the value 'a' and print in the function. You'll be allowed to add code only inside the called function. main() { int a=5; function(); // no parameters should be passed } function() { /* add code here to modify the value of and print here */ }

1 Answers  


What is the purpose of main( ) in c language?

0 Answers  


main() { char ch='356'; Printf("%d",ch); } *OUTPUT*:- -18 *Why?*

1 Answers  


Categories