hi every body
I have big project but I have problem in one question because I cannot understand it very well but I try to write this code but I can not implement please I need help because I have not more time to
this is guestion:-
Write a program by useing c++ that demonstrates a simple inventory system that calculates the number of items to be ordered after each week of business and the inventory-level for the beginning of the following week. Use parameters for the number of items demanded by the customer and the amount ordered from the supplier.
this my code:-
CODE
#include<iostream.h>
/* varabel I it means Inventory level ,I[0] initial inventory level in company ,
I[n] final inventory level in company and I suppose that initial and fainal inventory level equal
S(max inventory level inc ompany and s(mini inventory level in company ) , O(order from customer )*/
int calculat()
{
int I[7],s,S,i=0,d[7],o[7];
cout<<"what the mini inventory in company\n";
cin>>s;
cin>>"what the max inventory level in busines\n";
cin>>S;
I[0]=S;
while(i<=7)
{
cout<<"how many demaned from customer\n";
cin>>d[i];
i++;
if(I[i-1]<s)
o[i-1]=S-I[i-1];
else
o[i-1]=0;
I[i]=I[i-1]+o[i-1]-d[i];
}
int n=i;
o[n]=S-I[n];
I[n]=S;
return I[1] ,I[7],o[n];
}
void main()
{
cout<<"the invetory levei at begging and end of week\n";
cout<<calculat();
}
*Mod Edit: Added code tags: