#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{
float EOQ,dem_rate,set_cost,hold_cost,TBO;
clrscr();
printf("\nEnter demand rate:");
scanf("%f",&dem_rate);
printf("\nEnter setup costs:");
scanf("%f",&set_cost);
printf("\nEnter holding cost per item per unit time:");
scanf("%f",&hold_cost);
EOQ=sqrt((2*dem_rate*set_cost)/(hold_cost));
TBO=sqrt((2*set_cost)/(dem_rate*hold_cost));
printf("\nEconomic Order Quantity is:%f",EOQ);
printf("\n");
printf("\nTime Between Orders is:%f",TBO);
getch();
}
/*
output
Enter demand rate:50
Enter setup costs:2000
Enter holding cost per item per unit time:1500
Economic Order Quantity is:11.547006
Time Between Orders is:0.230940
*/