elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado:


  Mostrar Mensajes
Páginas: [1] 2 3 4 5
1  Programación / PHP / Re: Alguien me orienta en: 18 Enero 2016, 19:59 pm
Gracias brother pero errores tras errores pude lograr que me imprima la tabla de amortizacion que hacia llamaba en el ciclo for.
Código
  1. public function CalcPrestamo($monto, $interes, $tiempo){
  2.                $this->monpre = $monto;
  3.                $this->intpre = $interes;
  4.                $this->timepre = $tiempo;
  5.  
  6.                $interes /=100;
  7.  
  8.                $int = $monto * $interes;
  9.                $intCuo = $int / $tiempo;
  10.                $pagCap = $monto / $tiempo;
  11.                $cuotas = $intCuo + $pagCap;
  12.                $amort = $cuotas - $int;
  13.                $vf = $monto + $int;
  14.  
  15.                echo "<HR />";
  16.                echo "<h3><strong>Calculos del Prestamo</strong></h3>";
  17.  
  18.                echo '<table align="center" width="40%" border="0" cellspacing="1" cellpadding="1">';
  19.                echo "<tr>";
  20.                echo "<td align='left'>MONTO: </td>";
  21.                echo '<td colspan="2"><div align="left" >'.$monto.'</div></td>';
  22.                echo '<td align="left">INTERES:</td>';
  23.                echo '<td colspan="2"><div align="left" >'. $int .'</div></td>';
  24.                echo '</tr>';
  25.                echo "<tr>";
  26.                echo "<td align='left'>TIEMPO: </td>";
  27.                echo '<td colspan="2"><div align="left" >'.$tiempo.'</div></td>';
  28.                echo '<td align="left">CUOTA:</td>';
  29.                echo '<td colspan="2"><div align="left" >'. round($cuotas,2) .'</div></td>';
  30.                echo '</tr>';
  31.                echo "</table>";
  32.                echo "<br />";
  33.  
  34.                            echo "<table class='tableloans' cellspacing='1' align='center' border='1'>";
  35.                            echo "<tr>";
  36.                                echo "<th align='center'>Periodo</th>";
  37.                                echo "<th align='center'>Cuota</th>";
  38.                                echo "<th align='center'>Inter&eacute;s</th>";
  39.                                echo "<th align='center'>Amortz</th>";
  40.                                echo "<th align='center'>T Amortizado</th>";
  41.                            echo "</tr>";
  42.  
  43.                        $tar = 0;
  44.  
  45.                        for($valor = 1; $valor <= $tiempo; $valor++){
  46.                            $tar = $tar+$amort;
  47.  
  48.                            echo "<tr>";
  49.                                echo "<td align='center'>".$valor. "</td>";
  50.                                echo "<td align='center'>".round($cuotas,2) . "</td>";
  51.                                echo "<td align='center'>".$int . "</td>";
  52.                                echo "<td align='center'>".round($amort,2). "</td>";
  53.                                echo "<td align='right'>". round($tar,2) ."</td>";
  54.                            echo "</tr>";
  55.                        }
  56.                        echo "<table>";
  57.            }
Esa fue la solucion a mi problema Gracias
2  Programación / PHP / Re: [duda] campo formulario textarea? en: 18 Enero 2016, 14:58 pm
Amigo checa el tipo de dato y el tamaño del campo sinosis en tu base de datos.
3  Programación / PHP / Alguien me orienta en: 18 Enero 2016, 14:39 pm
Tengo este codigo:

Código
  1. public function CalcPrestamo($monto, $interes, $tiempo){
  2.                $this->monpre = $monto;
  3.                $this->intpre = $interes;
  4.                $this->timepre = $tiempo;
  5.  
  6.                $interes /=100;
  7.  
  8.                $int = $monto * $interes;
  9.                $pagCap = $monto / $tiempo;
  10.                $cuotas = $int + $pagCap;
  11.                $amort = $cuotas - $pagCap;
  12.                $vf = $monto + $int;
  13.  
  14.                echo "<HR />";
  15.                echo "<h3><strong>Calculos del Prestamo</strong></h3>";
  16.  
  17.                echo '<table width="361" border="0" cellspacing="2" cellpadding="1">';
  18.                echo "<tr>";
  19.                echo "<td width='295'><div align='right' class='style2'>MONTO: </div></td>";
  20.                echo '<td width="56"><div align="right" class="style2">'.$monto.'</div></td>';
  21.                echo '</tr>';
  22.                echo '<tr>';
  23.                echo '<td width="295"><div align="right" class="style2">INTERES:</div></td>';
  24.                echo '<td width="56"><div align="right" class="style2">'. $int .'</div></td>';
  25.                echo '</tr>';
  26.                echo '<tr>';
  27.                echo '<td width="295"><div align="right" class="style2">TIEMPO DE PAGO:</div></td>';
  28.                echo '<td width="56"><div align="right" class="style2">'.$tiempo.'</div></td>';
  29.                echo '</tr>';
  30.                echo "<tr>";
  31.                echo '<td width="295"><div align="right" class="style2">CUOTA</div></td>';
  32.                echo '<td width="56"><div align="right" class="style2">'.$cuotas.'</div></td>';
  33.                echo "</tr>";
  34.                echo "</table>";
  35.                echo "<br />";
  36.  
  37.                echo "<table class='tableloans' align='center'>";
  38.                            echo "<tr>";
  39.                                echo "<th align='center'>TIEMPO</th>";
  40.                                echo "<th align='center'>CUOTA</th>";
  41.                                echo "<th align='center'>INTERES</th>";
  42.                                echo "<th align='center'>AMORTIZACION</th>";
  43.                                echo "<th align='center'>T AMORTIZADO</th>";
  44.                            echo "</tr>";
  45.  
  46.                        for($i = 1; i <= $tiempo; $i++){
  47.                            echo "<tr>";
  48.                                echo "<td align='left'>".$tiempo . "</td>";
  49.                                echo "<td align='left'>".$cuotas . "</td>";
  50.                                echo "<td align='left'>".$int . "</td>";
  51.                                echo "<td align='left'>".$amort . "</td>";
  52.                                echo "<td align='left'>".$vf . "</td>";
  53.                            echo "</tr>";
  54.                        }
  55.                        echo "<table>";
  56. //aqui no me imprime nada
  57.            }
  58.  

Gracias de ante mano!!!
4  Programación / Bases de Datos / Re: Necesito algunas Sugerencias en: 6 Enero 2016, 22:31 pm
Gracias Hade con eso puedo tener una idea mas clara
5  Programación / Bases de Datos / Re: Necesito algunas Sugerencias en: 5 Enero 2016, 03:47 am
El Sistema de Prestamos que tengo en mente es para llevar el control de los pagos, es decir un cliente solicita un prestamo y el mismo elige si quiere pagarlo diario, semanal, quincenal, mensual, bimensual, trimestral. Dependiendo el tipo de pago se generara una tabla de los pagos que debe realizar el cliente.

Gracias
6  Programación / Bases de Datos / Necesito algunas Sugerencias en: 4 Enero 2016, 06:33 am
Cuales tablas podria crear para un Sistema de Prestamos

Ya tengo:

Cliente
Prestamo
DetallePrestamo

Alguien me puede ayudar si no es mucha molestia
7  Programación / Programación C/C++ / Ayuda por favor un error en: 19 Mayo 2015, 03:22 am
Tengo esta funcion amigos, antes de uso un deque<cEstudiante> dEstudiante

Código
  1. void eliminar_estudiante(){
  2.    int cont = -1;
  3.    char op;
  4.    string matricula;
  5.    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), Color_Yellow);
  6.    cout<<"      ---------------------------------------------------------------------\n";
  7.    cout<<"             <<<<<<<<<<     ESTUDIANTES->ELIMINAR        >>>>>>>>>>";
  8.    cout<<"\n      ---------------------------------------------------------------------\n";
  9.    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), Color_Def);
  10.    cout<<endl;
  11.    cout<<"\n\tELIMINAR UN ESTUDIANTE";
  12.    cout<<"\n\n\tIngrese la posici\242n:"; cin>>matricula;
  13.    for(it=dEstudiante.begin(); it!=dEstudiante.end(); ++it){
  14.        cEstudiante PrintEstudiante = *it;
  15.            if((*it) == matricula){      
  16.  dEstudiante.erase(find(dEstudiante.begin(),dEstudiante.end(), matricula));
  17.   deque<dEstudiante>::iterator itTemp = --it;
  18.               cont++;  
  19.               cout<<"\n\n\tREGISTRO ELIMINADO...!!!!!\n";    
  20.               }
  21.               } if (cont == -1){
  22.                       cout<<"\n\tMATRICULA INCORRECTA...!!\n";
  23.               }cont = -1;
  24.        do{
  25.  
  26.        cout<<"\n\n\tDesea seguir eliminando? <S/N>: ";
  27.        cin>>op;
  28.        switch(op){
  29.            case 's':   system("cls");
  30.                        eliminar_estudiante();
  31.                        break;
  32.            case 'S':   system("cls");
  33.                        eliminar_estudiante();
  34.                        break;
  35.            case 'n':   return ;
  36.  
  37.            case 'N':   return ;
  38.  
  39.            default: cout<<"\n\t Ingrese una opcion valida";
  40.            }
  41.    }while(op=='y'||op=='Y');
  42. }

Me da error:
265 C:\Users\JuanaG\Programacion\Estructura de Datos\DataBases.cpp no match for 'operator==' in '(&it)->std::_Deque_iterator<_Tp, _Ref, _Ptr>::operator* [with _Tp = cEstudiante, _Ref = cEstudiante&, _Ptr = cEstudiante*]() == matricula'
8  Programación / Programación C/C++ / Alguien me da una idea de crear un programa usando grafos en C++ en: 12 Mayo 2015, 17:58 pm
Necesito hacer un programa en C++ que me imprima los cargos de una empresa en orden jerarquicos usando Grafos y no tengo idea de como hacerlo.

Alguna sugerencia?
9  Programación / Programación C/C++ / Re: [AYUDA] 'variable' was not declared in this scope en: 12 Mayo 2015, 17:09 pm
Aunque te recomendaria que uses los metodos setter y getter. Es para ayudar que estamos.
10  Programación / Programación C/C++ / Re: [AYUDA] 'variable' was not declared in this scope en: 12 Mayo 2015, 16:52 pm
Buenas, para tu duda lo que debes hacer es usar el objeto que creaste M y luego colocar el (.) para acceder a los atributos de la clase.

Ejemplo:
Código
  1. {
  2. case 1:
  3. cout<<"NOMBRE: ";
  4. cin>>M.nombre;
  5. cout<<"ESPECIALIDAD: ";
  6. cin>>M.especialidad;

Lee un poquito mas sobre las clases y te ayudara a entender mejor tu programa
Páginas: [1] 2 3 4 5
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines