You are on page 1of 5

ECONOMIC ORDER QUANTITY

#include<iostream.h>
#include<conio.h>
#include<math.h>
class economic_order_quantity
{
double req,eoq,ocost,hcost;
public:
void input(void)
{
cout<<endl<<"INPUT:-";
cout<<endl<<"REQUIREMENT Rs: ";
cin>>req;
cout<<endl<<"ORDER COST Rs: ";
cin>>ocost;
cout<<endl<<"HOLDING COST Rs: ";
cin>>hcost;
}
void display(void)
{
cout<<endl<<"OUTPUT:-";
cout<<endl<<"ECONOMIC ORDER QUANTITY IS Rs: "<<eoq;
}
void calculate(void)
{
input();
eoq=sqrt((12*req*ocost)/hcost);
display();
}
};
void main(void)
{
economic_order_quantity eoq;
clrscr();
cout<<endl<<"TO FIND ECONOMIC ORDER QUANTITY"<<endl;
eoq.calculate();
getch();
}
FIND SIMPLE AND COMPOUND INTEREST

#include<iostream.h>
#include<conio.h>
#include<math.h>
class simple_interest
{
public:
float p,n,r;
void getdata()
{
cout<<endl<<endl<<"INPUT:-";
cout<<endl<<"PRINCIPAL AMOUNT Rs: ";
cin>>p;
cout<<endl<<"NO OF YEARS: ";
cin>>n;
cout<<endl<<"RATE OF INTREST: ";
cin>>r;
}
};
class compound_interest
{
public:
simple_interest si;
void calculate(void)
{
float i,intr,amt;
si.getdata();
cout<<endl<<"OUTPUT:-";
cout<<endl<<"SIMPLE INTEREST";
intr=si.p*si.n*si.r/100;
amt=si.p+intr;
cout<<endl<<"INTEREST FOR "<<si.n<<" YEARS IS RS: "<<intr;
cout<<endl<<"AMOUNT FOR "<<si.n<<" YEARS IS RS: "<<amt;
cout<<endl<<endl<<"COMPOUND INTEREST";
i=si.r/100;
intr=si.p*(pow((i+1),si.n)-1);
amt=si.p+intr;
cout<<endl<<"INTEREST FOR "<<si.n<<" YEARS IS RS: "<<intr;
cout<<endl<<"AMOUNT FOR "<<si.n<<" YEARS IS RS: "<<amt;
}
};
void main(void)
{
compound_interest interesti;
compound_interest ci;
clrscr();
cout<<"TO FIND SIMPLE AND COMPOUND INTEREST";
ci.calculate();
getch();
}
WORKINK CAPITAL
#include<iostream.h>
#include<conio.h>
class num
{
int a;
public:
void input(void);
void show(void);
friend num operator-(int,num);
};
void num::input()
{
cout<<endl<<"ENTER THE LIABILITIES VALUE Rs: ";
cin>>a;
}
void num::show()
{
cout<<endl<<endl<<"OUTPUT:-";
cout<<endl<<"Rs: "<<a;
if(a>0)
{
cout<<" is increase in working capital";
}
cout<<endl<<"Rs: "<<a;
if(a<0)
{
cout<<" is decrease in working capital";
}
}
num operator-(int s,num t)
{
num temp;
temp.a=s-t.a;
return(temp);
};
int main(void)
{
int n;
num x,y;
clrscr();
cout<<"WORKINK CAPITAL";
cout<<endl<<
endl<<"INPUT:-";
cout<<endl<<"ENTER THE ASSET VALUE Rs: ";
cin>>n;
x.input();
y=n-x;
y.show();
getch();
return 0; }
COST SHEET

#include<iostream.h>
#include<conio.h>
class costsheet
{
public:
long primecost;
};
class totalsales:public costsheet
{
public:
long workcost,cop,tot;
void getinfo();
void calinfo();
void dispinfo();
};
void totalsales::getinfo()
{
cout<<"COST SHEET PREPARATION";
cout<<endl<<endl<<"INPUT:-";
cout<<endl<<"ENTER THE PRIME COST Rs: ";
cin>>primecost;
cout<<endl<<"ENTER THE WORKING COST Rs: ";
cin>>workcost;
cout<<endl<<"ENTER THE COST OF PRODUCTION Rs: ";
cin>>cop;
}
void totalsales::calinfo()
{
tot=primecost+workcost+cop;
}
void totalsales::dispinfo()
{
cout<<endl<<"OUTPUT:-";
cout<<endl<<"TOTAL SALES Rs:"<<tot;
}
int main()
{
totalsales t;
clrscr();
t.getinfo();
t.calinfo();
t.dispinfo();
getch();
return 0;
}
NET INCOME OF THE FAMILY

#include<iostream.h>
#include<conio.h>
class income
{
public:
int a;
void geta()
{
cout<<endl<<endl<<"INPUT:-";
cout<<endl<<"ENTER THE INCOME RS: ";
cin>>a;
}
};
class expense
{
public:
int b;
void getb()
{
cout<<endl<<"ENTER THE EXPENSE Rs: ";
cin>>b;
}
};
float net_income(income s1,expense s2)
{
float net;
net=s1.a-s2.b;
return net;
}
int main()
{
clrscr();
cout<<"NET INCOME OF THE FAMILY";
income s1;
expense s2;
s1.geta();
s2.getb();
cout<<endl<<"OUTPUT:-";
cout<<endl<<"NET INCOME IS Rs: "<<net_income(s1,s2);
getch();
return 0;
}

You might also like