This is what I have so far I thought i almost had it.
Thanks alot
Code:
#include <iostream.h>
#include <iomanip.h>
//Named constants - residential customers
const double healthi = 58.00;
const double h0 = 0.00;
int main()
{
//Variable declaration
char empn[25];
double basepay;
int stm;
int comm1 ;
int comm2;
int comm3 ;
int comm4;
double gp;
double rt1;
double rt2;
double rt3;
double test;
double test1;
double ngp;
double ngp1;
double ngp2;
double ngp3;
double ngp0;
//Inputs - Emp. Name, Base Pay and Sales This Month
cout<<fixed<<showpoint;
cout<<setprecision(2);
cout<<endl;
cout<<"Enter Employee's name: ";
cin>> empn;
cout<<endl;
cout<<"Enter Base Pay:";
cin>> basepay;
cout<<endl;
cout<<"Enter Dollar Amount Of Sales This Month: ";
cin>> stm;
cout<<endl;
//Commission Processiong
if (stm < 1200)
{
comm1=stm-200;
comm2=comm1*.065;
cout<<endl;
gp=comm2+basepay ;
cout<<"\nGross Pay: "<<gp ;
}
else
{ comm3=stm-150;
comm4=comm3*.0725;
cout<<endl;
gp=comm4+basepay ;
cout<<endl; }
cout<<endl;
//Deductions
cout<<endl;
if (gp < 600)
{
h0;
cout<<endl;
}
else
{
cout<<endl;
healthi ;
}
cout<<endl;
rt1=basepay*.09;
if (comm2 > comm4)
{rt2=comm2*.17 ;
test=gp-rt2 ;
}
else
{
rt3=comm4*.17;
test1=gp-rt3 ;
}
;
ngp=gp-(healthi || h0);
ngp1=ngp-rt1;
ngp0=ngp1-(rt2 || rt3);
ngp2=ngp0*.245;
ngp3=ngp0-ngp2;
cout<<endl;
if (test > test1)
{cout<<"\n BUDGET REPORT FOR"<<empn ;
cout<<"\nINCOME:" ;
cout<<"\nBase Pay:$"<<basepay ;
cout<<"\nSales:$"<<stm ;
cout<<"\nCommission:$"<<comm2 || comm4 ;
cout<<"\nGross:$"<<gp ;
cout<<"\nDeductions:" ;
cout<<"\n Insurance: -$"<<(h0 || healthi) ;
cout<<"\n Retirement:-$"<<rt1 ;
cout<<"\n Taxes: -$"<<ngp2 ;
cout<<"\n******************************************************************";
cout<<"\nNet:$"<<ngp3 ;
}
return 0;
}