UNA HERMOSA MOTO

UNA HERMOSA MOTO

miércoles, 22 de abril de 2015

Problema Resuelto 08



08.-INTERES COMPUESTO:

Resultado de imagen para INTERES COMPUESTO
Resultado de imagen para INTERES COMPUESTO

* and open the template in the editor.
 */
package problema8;
import java.io.*;
/**
 *
 * @author ABEL MONTALVAN
 */
public class Problema8 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
         float c, r, t, i, m;
                  
    BufferedReader in =new BufferedReader(new  InputStreamReader(System.in));
 System.out.println("Capital: ");
        c=Float.parseFloat(in.readLine());
        System.out.println("Tasa de interes: ");
        r=Float.parseFloat(in.readLine());
        System.out.println("Tiempo: ");
        t=Float.parseFloat(in.readLine());
    
    m=(float)(Math.pow((double)(1+r/100),(double)t))*c;
    i=m-c;
    
     System.out.println("");
      System.out.println("Interes: " + i);
      System.out.println("Monto: " + m);
      
    
    }
    
}
 
 

No hay comentarios:

Publicar un comentario