You are on page 1of 1

To determine the Economic order Quantity, Total number of order Roll no --- 06 #include<iostream.h> #include<conio.h> #include<math.

h> class quantity { float D, Co, Cc, Q, T, O; int days; public: void getdata(); void calculate(); void showdata(); }; void quantity::getdata() { cout<<"Enter the ordering cost : "; cin>>Co; cout<<"\nEnter the carrying cost : "; cin>>Cc; cout<<"\Enter the annual demand : "; cin>>D; } void quantity::calculate() { Q=sqrt((2*Co*D)/Cc); T=Q/D; O=D/Q; days=T*365; } void quantity::showdata() { cout<<"\nEconomic order Quantity is Q* = "<<Q; cout<<"\nTime between the orders is = "<<T; cout<<"\nTotal number of orders per Years = "<<O; cout<<"\nTime per days is = "<<days; } void main() { clrscr(); quantity q; q.getdata(); q.calculate(); q.showdata(); getch(); } -:OUTPUT:Enter the ordering cost : 250 Enter the carrying cost : 30 Enter the annual demand : 5400 Economic order Quantity is Q* = 300 Time between the orders is = 0.055556 Total number of orders per Years = 18 Time per days is = 20

You might also like