c++ Programa Barco

Páginas: 4 (788 palabras) Publicado: 15 de abril de 2012
.H

#ifndef EXAMEN4_H
#define EXAMEN4_H
void limpiaArreglo(int bodega1[], int bodega2[], int bodega3[], int bodega4[], int n)
{
for(int i=0; i<n; i++)
bodega1[i]=0;
for(int i=0;i<n; i++)
bodega2[i]=0;
for(int i=0; i<n; i++)
bodega3[i]=0;
for(int i=0; i<n; i++)
bodega4[i]=0;

}

void ingresoArray(int bodega1[], int bodega2[], int bodega3[], intbodega4[], int n)
{
cout<<"Ingrese la cantidad de los 20 contenedores de cada bodega : "<<endl;
cout<<"BODEGA 1: "<<endl;
for(int i=0;i<n; i++)
{
do{cin>>bodega1[i];
}while(bodega1[i]<2 || bodega1[i]>10);
}
cout<<"BODEGA 2: "<<endl;
for(int i=0;i<n; i++)
{
do{
cin>>bodega2[i];
}while(bodega2[i]<2 ||bodega2[i]>10);
}
cout<<"BODEGA 3: "<<endl;
for(int i=0;i<n; i++)
{
do{
cin>>bodega3[i];
}while(bodega3[i]<2 || bodega3[i]>10);
}
cout<<"BODEGA4: "<<endl;
for(int i=0;i<n; i++)
{
do{
cin>>bodega4[i];
}while(bodega4[i]<2 || bodega4[i]>10);
}

}
void totalunaxuna( int bodega1[], int bodega2[], intbodega3[], int bodega4[], int n)
{
int suma1=0,suma2=0,suma3=0,suma4=0;
cout<<"bodegas y contenedores"<<endl;
cout<<"TOTAL DE LA BODEGA 1"<<endl;
for(int i=0; i<n;i++)
{
if(bodega1[i]<2 || bodega1[i]>10)
{
suma1=suma1+bodega1[i];
}
cout<<suma1<<endl;
}
cout<<suma1<<endl;
cout<<"TOTAL DE LA BODEGA2"<<endl;
for(int i=0; i<n; i++)
{
if(bodega2[i]<2 || bodega2[i]>10)
{
suma2=suma2+bodega2[i];
}
}
cout<<suma2<<endl;
cout<<"TOTAL DE LA BODEGA3"<<endl;
for(int i=0; i<n; i++)
{
if(bodega3[i]<2 || bodega3[i]>10)
{
suma3=suma3+bodega3[i];
}
}
cout<<suma3<<endl;
cout<<"TOTAL DE LA BODEGA...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Programas en c#
  • Programa c#
  • PROGRAMAR EN C
  • C++ Programas De C++
  • Programas en c++
  • programa en c++
  • programas en c
  • Programas c#

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS