cout<<"\n \n Average Turn Around Time is :"<<avgturn;
cout<<"\n \n Average Waiting Time is :"<<avgwait;
getch(); }
OUTPUT:
PROGRAM 6
AIM: - Program to simulate Cob Web Model
PROGRAM:-
#include<iostream.h> #include<conio.h> void main() { clrscr(); int P,a,b,c,d,p,S,Q; cout<<"\n Enter Initial Price:"; cin>>p; cout<<"\n Enter the Value of Contants a,b,c and d:"; cin>>a>>b>>c>>d; cout<<"\n The Initial Price is:"<<p; cout<<"\n The Values of Constants a:"<<a<<"b:"<<b<<"c:"<<c<<"and d:"<<d; P=p; for(int i=0;i<=5;i++) { S=c+(d*P); Q=S; P=(a-Q)/b; } cout<<"\n Price for Interval:"<<P; cout<<"\n Quantity for Interval:"<<Q; getch(); } OUTPUT:
PROGRAM 7
AIM: - Write a program for Inventory system.
PROGRAM :-
#include<iostream.h> #include<conio.h> #include<stdio.h> #include<stdlib.h> #include<math.h> void main() { clrscr(); int q1, q2, rp1, rp2, tdays, dmd, cdmd, stk, cstk, day, dd1, dd2, lt1, lt2; int ishort, cshort, ord1, ord2; float x, avstk, s1; cout<<"\n Enter q1 and q2 :"; cin>>q1>>q2;
cout<<"\n Enter rp1 and rp2 :"; cin>>rp1>>rp2;
day=1; dd1=0; dd2=0;
cout<<"\n Enter thr Run Length Days of Simulation :"; cin>>tdays;
ord1=0; ord2=0; ishort=0; cshort=0; cdmd=0;
cout<<"\n Enter Value of Initial stk :"; cin>>stk;