Professional Documents
Culture Documents
Codigo 1
Codigo 1
#include <math.h>
#include <cmath>
int n;
cout<<"INNOACEROS"<<endl;
cout<<"bodega"<<i<<"[precio]=";cin>>I[i];
cout<<endl;
cout<<"GYJ"<<endl;
cout<<"bodega"<<i<<"[precio]=";cin>>G[i];
cout<<endl;
cout<<"RELIVE ACERO"<<endl;
cout<<"bodega"<<i<<"[precio]=";cin>>R[i];
cout<<endl;
cout<<"METALDECK"<<endl;
cout<<"bodega"<<i<<"[precio]=";cin>>M[i];
}
cout<<endl;
cout<<"OFERTA"<<endl;
cout<<"bodega"<<i<<"[precio]=";cin>>O[i];
cout<<endl;
cout<<"DEMANDA"<<endl;
cout<<"empresa"<<i<<"[precio]=";cin>>D[i];
cout<<endl;
ON[1]=O[1];
DN[1]=D[1];
if(D[1]<O[1]){
ON[1]=O[1]-D[1];
MUL[1];
if(D[2]<ON[1]){
ON[2]=ON[1]-D[2];
MUL[52]=ON[2];
if(D[3]<ON[2]){
ON[3]=ON[2]-D[3];
if(D[2]<ON[1]){
ON[4]=ON[3]-D[4];
else
DN[2]=ON[2]-D[2];
else
DN[1]=O[1]-D[1];
cout<<ON[1]<<endl<<ON[2]<<endl<<ON[3]<<endl<<ON[4]<<endl;
system("PAUSE");
return EXIT_SUCCESS;