===========================================================================
CODING
#include<iostream.h>
#include<conio.h>
#include<math.h>
#include<stdio.h>
void main()
{
clrscr();
float age,lic,aexpense,rebate80,rebate20,basicsalary,total,T,gst,p1,p2,p3;
char name[20];
cout<<"TAX Calculation:- \n Enter your Name: ";
gets(name);
cout<<"\n Enter Age: ";
cin>>age;
cout<<"\n Enter your LIC: ";
cin>>lic;
cout<<"\n Enter your Approx. Expense: ";
cin>>aexpense;
cout<<"\n Enter 80 CC rebate: ";
cin>>rebate80;
cout<<"\n Enter 20 CC rebate: ";
cin>>rebate20;
cout<<"\n Enter Basic Salary: ";
cin>>basicsalary;
total=basicsalary*12-lic-aexpense+0.2*rebate80+0.8*rebate20;
if(total>0 && total<=300000)
{
T=0;
gst=0;
}
else if(total>300000 && total<=500000)
{
p1=0.1*(total-300000);
gst=0.125*p1;
T=gst+p1;
}
else if(total>500000 && total<=1000000)
{
p1=0.1*(200000);
p2=0.2*(total-500000);
gst=0.125*(p1+p2);
T=p1+p2+gst;
}
else if(total>1000000)
{
p1=0.1*200000;
p2=0.2*500000;
p3=0.3*(total-1000000);
gst=0.125*(p1+p2+p3);
T=gst+p1+p2+p3;
}
cout<<"\n"<<name<<" You have to pay a total TAX of: "<<T<<" inclusive gst of: "<<gst;
getch();
}
CODING
#include<iostream.h>
#include<conio.h>
#include<math.h>
#include<stdio.h>
void main()
{
clrscr();
float age,lic,aexpense,rebate80,rebate20,basicsalary,total,T,gst,p1,p2,p3;
char name[20];
cout<<"TAX Calculation:- \n Enter your Name: ";
gets(name);
cout<<"\n Enter Age: ";
cin>>age;
cout<<"\n Enter your LIC: ";
cin>>lic;
cout<<"\n Enter your Approx. Expense: ";
cin>>aexpense;
cout<<"\n Enter 80 CC rebate: ";
cin>>rebate80;
cout<<"\n Enter 20 CC rebate: ";
cin>>rebate20;
cout<<"\n Enter Basic Salary: ";
cin>>basicsalary;
total=basicsalary*12-lic-aexpense+0.2*rebate80+0.8*rebate20;
if(total>0 && total<=300000)
{
T=0;
gst=0;
}
else if(total>300000 && total<=500000)
{
p1=0.1*(total-300000);
gst=0.125*p1;
T=gst+p1;
}
else if(total>500000 && total<=1000000)
{
p1=0.1*(200000);
p2=0.2*(total-500000);
gst=0.125*(p1+p2);
T=p1+p2+gst;
}
else if(total>1000000)
{
p1=0.1*200000;
p2=0.2*500000;
p3=0.3*(total-1000000);
gst=0.125*(p1+p2+p3);
T=gst+p1+p2+p3;
}
cout<<"\n"<<name<<" You have to pay a total TAX of: "<<T<<" inclusive gst of: "<<gst;
getch();
}
===========================================================================
No comments:
Post a Comment