Académique Documents
Professionnel Documents
Culture Documents
{
return Columna; void Placa::Imprimir( void )
}//
{
double Placa::ObtPre( void ) for( int i = 0; i < ObtRen( ); i++ )
{ { cout << endl;
return Precision; for ( int j = 0; j < ObtCol( ); j++ )
{
}//
cout << AptAM[i][j] << " ";
//Asignar Memoria }//Fin del for interno
void Placa::AsigMem( int Ren, int Col ) }//Fin del for externo
cout << endl << endl;
{ }//Fin de Imprimir( )
AptAM = new double* [ Ren ];
for( int i = 0; i < ObtRen( ); i++ ) void Placa::CalTem( void )
{
{
double TemVie;
AptAM[i] = new double [ Col ];
bool Bandera = false;
}
for( int d = 0; d < ObtRen( ); d++ )
for( int i = 0; i < ObtRen( ); i++ )
{ for ( int j = 1; j < ObtCol( )-1; j++ )
for ( int j = 0; j < ObtCol( ); j++
{AptAM[d][j] = (AptAM[d][0] +
{ AptAM[i][j] = 0; }
AptAM[d][ObtCol( )-1]) / 2.0;}
}//
}
void Placa::Leer( void )
while( Bandera == false )
{
{
for( int i = 0 ; i < ObtRen( ); i++ )
{ cout << "Dame la Temperatura T1 del for( int i = 0; i < ObtRen( ); i++ )
elemento [ " << i << " ] << "[ 0 ] = ";
cin >> AptAM[i][0]; {
cout << "Dame la Temperatura T2 del for ( int j = 1; j < ObtCol( )-1; j++ )
elemento [ " << i << " ]" << "[ " << ObtCol() - 1
<< " ] = "; {
cin >> AptAM[ i ] [ (ObtCol() - 1) ];
cout << endl;} TemVie = AptAM[i][j];
cout << "Dame la precision = ";
cin >> Precision;
AptAM[ i ][j] = (AptAM[i][j-1] + {
AptAM[i][j] + AptAM[i][j+1]) / 3.0;
AptAM[i][j] = (AptAM[i-1][j-1] +
if( fabs( AptAM[i][j] - TemVie) < AptAM[i-1][j] + AptAM[i-1][j+1] +
Precision )
AptAM[i][j-1] + AptAM[i][j] +
Bandera = true; AptAM[i+1][j+1]+
else AptAM[i+1][j-1] +
AptAM[i+1][j] + AptAM[i+1][j+1]) / 9.0;
Bandera = false;
}//
void Placa::PromEsqui( int i, int j, int A )
void Placa::CalTemPla( void )
{
{
AptAM[i][j] = (AsenDes( i, j) +
int A=0; CalSum(i))/A;
A=ObtRen()+(ObtCol()-1); }//
{ {
Res+= AptAM[c][j];
{ char c;
Res+= AptAM[i][j]; do
} {
for ( int i=0 ;i<ObtRen( )-1; i++ ) Placa M1( Ren, Col );
M1.Imprimir();
return Res;
M1.CalTemPla();
}//
cout<<"Temperatura de la placa"<<endl; try
M1.Imprimir(); {if(Ren<2||Col<2)
throw (1);}
cout<<"DESEA CONTINUAR (S/N):";
catch(int E)
cin>>c;
{cout<<endl<<"Datos incorrectos"<<endl;
c=toupper(c);
system("pause");}
while(c=='S'); } while(Ren<2||Col<2);
system( "pause" ); }
return 0;
}//
do
system("cls");
cout<<endl<<"\t\tLectura de Datos:
"<<endl